Locating first blank cell

  • Thread starter Thread starter Mike W
  • Start date Start date
M

Mike W

I am looking for a macro that will select the first blank (empty) cell in a
given column please.

Thanks,

Mike
 
Hi Mike

Sub test()
Dim GivenColumn As Long
GivenColumn = 1
Columns(GivenColumn).Find(What:="", _
After:=Cells(1, GivenColumn), _
LookAt:=xlWhole).Select
End Sub

HTH. Best wishes Harald
 
Harald said:
Hi Mike

Sub test()
Dim GivenColumn As Long
GivenColumn = 1
Columns(GivenColumn).Find(What:="", _
After:=Cells(1, GivenColumn), _
LookAt:=xlWhole).Select
End Sub

HTH. Best wishes Harald

"Mike W" <[email protected]> skrev i melding
If the column cell contains space characters instead of an empty string,
how would TRIM$ work inside this macro to find the first empty or
space(s)-only filled cell in the given column?
 
Back
Top