-
Skip to next empty cell
I've received good feedback on my questions here so I'll ask another.
I'm trying to find/write some vba code that will select the NEXT empty cell BELOW the active cell with there being empty cells above the active cell and the active cell also possibly being empty.
I'm a novice so the simpler the code the better. Thanks for any help.
-
[VBA]Sub NexgtBlank()
Dim c As Range
Set c = ActiveCell
If c(2) = "" Then
c(2).Select
ElseIf c(3) = "" Then
c(3).Select
Else
c(2).End(xlDown)(2).Select
End If
End Sub
[/VBA]
MVP (Excel 2008-2010)
Post a workbook with sample data and layout if you want a quicker solution.
To help indent your macros try Smart Indent
Please remember to mark threads 'Solved'
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules