Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Macro for last row
Hi Experts,
Need your help to get this working. I'm using the below macro to copy formulas up to the last row. However, it doesn't work when the worksheet have many rows of data (says 50,000 rows). It works fine for fewer rows. Function last_row() As Integer Row = 1 While Cells(Row, 1) < "" Row = Row + 1 Wend last_row = Row End Function Thanks in advance -- Freddie |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Macro for last row
Function last_row() As Long
Dim mRow As Long mRow = 1 While Cells(mRow, 1) < "" mRow = mRow + 1 Wend last_row = mRow End Function -- --- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "Freddie Ang" wrote in message ... Hi Experts, Need your help to get this working. I'm using the below macro to copy formulas up to the last row. However, it doesn't work when the worksheet have many rows of data (says 50,000 rows). It works fine for fewer rows. Function last_row() As Integer Row = 1 While Cells(Row, 1) < "" Row = Row + 1 Wend last_row = Row End Function Thanks in advance -- Freddie |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Macro for last row
Hi Bob,
Thanks alot for your great help. Regards -- Freddie "Bob Phillips" wrote: Function last_row() As Long Dim mRow As Long mRow = 1 While Cells(mRow, 1) < "" mRow = mRow + 1 Wend last_row = mRow End Function -- --- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "Freddie Ang" wrote in message ... Hi Experts, Need your help to get this working. I'm using the below macro to copy formulas up to the last row. However, it doesn't work when the worksheet have many rows of data (says 50,000 rows). It works fine for fewer rows. Function last_row() As Integer Row = 1 While Cells(Row, 1) < "" Row = Row + 1 Wend last_row = Row End Function Thanks in advance -- Freddie |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort | Excel Worksheet Functions | |||
My excel macro recorder no longer shows up when recording macro | Excel Discussion (Misc queries) | |||
My excel macro recorder no longer shows up when recording macro | Excel Discussion (Misc queries) | |||
using a cell value to control a counter inside a macro and displaying macro value | Excel Worksheet Functions | |||
Macro needed to Paste Values and prevent Macro operation | Excel Discussion (Misc queries) |