Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Find Last Row or Empty Row in VBA
Hi Folks
I have a sheet that I generate and save using automation from Access, and it works OK. Problem is I cant add to the previously made sheet. I need to be able to find the last row with data in the sheet (for a specific column) or the first empty row. Any suggestion on the VBA method that is used to do this? Cheers (TIA) -- Kahuna ------------ |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Find Last Row or Empty Row in VBA
Hi Kahuna,
Sub GotoBottomOfCurrentColumn() 'Tom Ogilvy 2000-06-26 Cells(Rows.Count, ActiveCell.Column).End(xlUp).Select End Sub since you want the next row Cells(Rows.Count,ActiveCell.Column).End(xlUp).offs et(1,0).Select --- HTH, David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001] My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm Search Page: http://www.mvps.org/dmcritchie/excel/search.htm "Kahuna" wrote in message ... Hi Folks I have a sheet that I generate and save using automation from Access, and it works OK. Problem is I cant add to the previously made sheet. I need to be able to find the last row with data in the sheet (for a specific column) or the first empty row. Any suggestion on the VBA method that is used to do this? Cheers (TIA) -- Kahuna ------------ |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Find Last Row or Empty Row in VBA
Spot on David - thanks for the quick response. Exactly what I needed.
-- Kahuna ------------ "David McRitchie" wrote in message ... Hi Kahuna, Sub GotoBottomOfCurrentColumn() 'Tom Ogilvy 2000-06-26 Cells(Rows.Count, ActiveCell.Column).End(xlUp).Select End Sub since you want the next row Cells(Rows.Count,ActiveCell.Column).End(xlUp).offs et(1,0).Select --- HTH, David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001] My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm Search Page: http://www.mvps.org/dmcritchie/excel/search.htm "Kahuna" wrote in message ... Hi Folks I have a sheet that I generate and save using automation from Access, and it works OK. Problem is I cant add to the previously made sheet. I need to be able to find the last row with data in the sheet (for a specific column) or the first empty row. Any suggestion on the VBA method that is used to do this? Cheers (TIA) -- Kahuna ------------ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
To find row is empty or not | Excel Discussion (Misc queries) | |||
Find first empty row | Excel Discussion (Misc queries) | |||
find the next empty row | Excel Discussion (Misc queries) | |||
Find last empty row | Excel Programming | |||
Find Next Empty Row | Excel Programming |