PDA

View Full Version : Skip to next empty cell



sonicflash
11-17-2011, 09:10 PM
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.

mdmackillop
11-18-2011, 04:31 AM
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

sonicflash
11-18-2011, 11:15 AM
Thanks. Works perfectly.