last column

  1. V

    VBA Code to automatically fill dates horizontally (not to last column)

    Hello everyone! This is my very first post on but I've been a site regular for many months now. You guys rock! I always find a thread of someone having the same doubt as myself, but I now have a somewhat specific query: I have a data sheet that is updated monthly where monthly...
  2. K

    VBA Excel to Find last column with data in Pivot Table excluding grand total column and row

    Hello, i have to find the last column with data(Column:AE in this case) in a Pivot Table excluding grand total column and row. I have tried different ways but all of it gave the column of the last cell( Column:AM) in Pivot Table. I have attached an image of the situation. Kindly help, Thank...
  3. S

    Dynamic selection of column by header name and pasting the whole data into next sheet

    Dear All, I am working on an excel sheet which has 14 to 15 columns ofdata and I would like to copy some of the columns (according to the headername) and paste it to the next sheet. Sample below: <tbody> Reviewed by PACE Client Name Sub Engaging Parties DUNS Number GFIS Client ID ABCD...
  4. H

    Copy Paste delete loop if column has data

    Hi, I am looking for a code that will help with what I want to achieve. I have a table where I have to split a column using text-to-columns. The number of columns created after will vary time to time. What I now want to do is copy the rows to a certain column and then for each of the columns...
  5. S

    Find Last Row in Worksheet Without VBA

    Long story short, my company creates a headache when you make anything with VBA, and I know this is SUPER easy to do in VBA, but as mentioned before I need to do this without VBA. I find the last row by doing: B1: =LOOKUP(2,1/(C:C<>""),ROW(C:C)) I find the last column by doing: B11...
  6. berty2000

    Select Range in Last column and Last Row

    Hi Guys Is it possible to select the range in column B from the last row with data in to the last column with data in row 3. Thanks in advance
  7. R

    VBA code with IF, cut/paste, & last column

    I have a list of travel details where each row is a different leg of a travelers journey. There are common details at the beginning of the row, such as passenger name and such. In order to use the data to auto-fill a templated itinerary I need to align the legs of the journeys per passenger...
  8. S

    "Simple" Select Last Row & Last Column & Name Range

    I've found dozens of almost answers, but am too ignorant to take the pieces to do what I want. I need to find the last row and the last column and name the range. Many, many postings show getting the last row, or the last column, but not how to use both in the expression. And cautions against...
  9. A

    Sort columns B,C,D based on column B then loop to next 3 columns and repeat till last column

    Hi Guy's I am looking for a little bit of help if possible. I have a worksheet that contain numerous columns of data that has been imported from other worksheets. The columns start at column B and repeat every 3 columns. The number of columns can vary per worksheet. The number of rows can...
  10. R

    Finding Data under a header and Copying to another sheet (VBA)

    Hello everyone! I have been using Mr.Excel for a while and have always been able to find answers to my questions until now. Basically I have a sheet which could have upto 52 columns of data, that are not always in the same sequence. I need to be able to find specific column names and copy the...
  11. M

    pasting to the last column in a specific row

    Hi, I'm new to VBA and trying to come up with a code for work. I keep a log of accounts with comments and I am trying to create a macro that will allow me to copy old comments from my main sheet and save them in another sheet, to keep a record of all historic comments in the file. I have...
  12. Jeffrey Mahoney

    Gift for the Community (Select Any Part of a Range)

    The Function below allows you to return a smaller section of a range provided. Returnable ranges are: - a cell - a range - a row - a column - multiple rows or columns - last row or column - multiple rows at the bottom - multiple columns on the right All I ask is that you LIKE this or post you...
  13. J

    adding a formula vba

    I am working on an inventory spreadsheet and have multiple things that i have working. but the one thing i seem to be struggling with is that i have a sheet "RECORDS" which keeps track of how many of each item i have for the date the inventory is checked which is every other week). what i am...
  14. E

    Macro autofill to last column

    New to Macros. Trying to autofill format only from E1 to the last column (row1 still). Tried this but it didn't work: Selection.AutoFill Destination:=Range("E1: & LastColumn & 1"), Type:=xlFillFormats I have this above it: Dim sht As Worksheet Dim LastColumn As Long Set sht =...
  15. L

    Last column with data in table - VBA or not

    Hi, I have a table object (in the range A1:M20) with some numbers spread around. I have been using the following code to find the last column, but it always show the last column of the table, event if there is not data (numbers) on the last column. Even if I have numbers only until column B...
  16. C

    Add last Column to Macro

    I am trying to change the Sub CleanAll() to Sub CleanAll2() but can not get it. Thanks Sub CleanAll() Dim myArray As Variant Dim lastRow As Long With Sheets("360") lastRow = .Range("A" & .Rows.Count).End(xlUp).Row End With myArray =...
  17. K

    VBA/Macro to use the last column of a worksheet to pull only text and remove duplicates

    Hi, I am wanting to create a macro (which I am hideously new to, sorry), to take the last column from a worksheet (it is a growing worksheet that gets added to daily) and take only the cells which contain text (there are a mixture of text, blanks and numbers) and remove the duplicates. The...
  18. C

    last row/col question...

    Regarding the identification of the last row or column of a spreadsheet, is it dangerous to use the single line below instead of the lengthy function lastrowN below it? My mind prefers simplicity but if it creates problems.... lastrow = ActiveSheet.Cells.SpecialCells(xlCellTypeLastCell).Row...
  19. T

    Last Column Using VBA

    I have searched through the website and even Bill Jelen's book, but I still cannot find the answer as to how to write the code to find the last column with data in it. I have tried defining a range as seen below, but it's still not working. Any suggestions? finalcolumn = Cells(1...
  20. S

    Copying dynamic range

    By using the following I get the row and column number of the "last" cell with contents:' lastrow = Cells.Find(What:="*", After:=[A1], SearchOrder:=xlByColumns, SearchDirection:=xlPrevious).Row lastcolumn = Cells.Find(What:="*", After:=[A1], SearchOrder:=xlByColumns...

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back