Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel Macro: Select first empty cell in a column

Status
Not open for further replies.

buggs13

MIS
Dec 30, 1999
6
0
0
US
I am trying to build a macro that will select the first empty cell in column &quot;A&quot; for all worksheets in a workbook.<br><br>So far I have this:<br><b><br>Sub Go_To_First_Empty_Cell()<br>'<br>' Go_To_First_Empty_Cell Macro<br><br>Dim ws, Asheet<br>Set Asheet = Worksheets(ActiveSheet.Name)<br>Application.ScreenUpdating = False<br>&nbsp;&nbsp;&nbsp;&nbsp;For Each ws In Worksheets<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ws.Select<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Application.Goto Reference:=ws.Range(&quot;A1&quot;), Scroll:=True<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Selection.End(xlDown).Select<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;Next ws<br>Asheet.Activate<br>Application.ScreenUpdating = True<br><br>End Sub<br></b><br>This gets me to the last cell with data in column &quot;A&quot;.&nbsp;&nbsp;I want to select the cell below that.<br><br>Any help?<br><br>
 
Put this after Application.ScreenUpdating = True<br><br><br>ActiveCell.Offset(1, 0).Select<br><br>I recorded it and couldn't figure out why it would have the range A1, but it doesn't select <p> <br><a href=mailto:techsupportgirl@home.com>techsupportgirl@home.com</a><br><a href= </a><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top