Forum Discussion
Scroll to first empty cell in a column
I have the following code that scrolls to a particular row but would like it to scroll to the first empty cell row on column "b". Is this something a macro can perform?:
Sub SCROLL2BOTTOM()
'
' SCROLL2BOTTOM Macro
'
'
ActiveSheet.Range("$BG$35:$BI$3880").AutoFilter Field:=1
ActiveWindow.ScrollRow = 3863
MsgBox "SCROLL2BOTTOM is completed."
End Sub
Greg Bonaparte - Is there any reason why you need a macro and could not just use CTRL + ↓ ? While that gets you to the last row that has contents another ↓ gets you to the first blank row in a column.
2 Replies
- ChrisMendozaIron Contributor
Greg Bonaparte - Is there any reason why you need a macro and could not just use CTRL + ↓ ? While that gets you to the last row that has contents another ↓ gets you to the first blank row in a column.
- Greg BonaparteIron Contributor
Hello ChrisMendoza
I didnt know about the ctrl arrow down fuction, however I was able to record a macro of it. Thanks for the advice. The new code looks like this, and works perfectly.
Sub SCROLL2BOTTOM()
'
' SCROLL2BOTTOM Macro
''
ActiveSheet.Range("$BG$35:$BI$3880").AutoFilter Field:=1
Range("B41").Select
Selection.End(xlDown).Select
MsgBox "SCROLL2BOTTOM is completed."
End Sub