Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro Help
I am trying to run a macro which will navigate to the first empty cell in my
workbook. This cell is always changing. The macro I'm running below always ends up in cell A31 regardless of what my empty cell is (today it's A377). Can anyone help? Thanks very much!! Windows("Daily OTD December 2008_kcs.xls").Activate Dim LastRow As Long LastRow = ActiveWorkbook.Worksheets(1) _ .Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Row Range("A" & LastRow).Select |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro Help
Are you on the first worksheet, or are you on the active sheet?
If you want to find the first empty cell of column A of the currently active sheet of the workbook Daily OTD..., then use Windows("Daily OTD December 2008_kcs.xls").Activate Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Select HTH, Bernie MS Excel MVP "Kell2604" wrote in message ... I am trying to run a macro which will navigate to the first empty cell in my workbook. This cell is always changing. The macro I'm running below always ends up in cell A31 regardless of what my empty cell is (today it's A377). Can anyone help? Thanks very much!! Windows("Daily OTD December 2008_kcs.xls").Activate Dim LastRow As Long LastRow = ActiveWorkbook.Worksheets(1) _ .Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Row Range("A" & LastRow).Select |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro recorded... tabs & file names changed, macro hangs | Excel Worksheet Functions | |||
Macro to copy and paste values (columns)I have a macro file built | Excel Programming | |||
Need syntax for RUNning a Word macro with an argument, called from an Excel macro | Excel Programming | |||
macro to delete entire rows when column A is blank ...a quick macro | Excel Programming | |||
Start Macro / Stop Macro / Restart Macro | Excel Programming |