![]() |
Locating first blank cell
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 "Mike W" skrev i melding ... I am looking for a macro that will select the first blank (empty) cell in a given column please. Thanks, Mike |
Brilliant Harald, just what I was trying to do myself, thank you.
Mike "Harald Staff" wrote in message ... 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" skrev i melding ... I am looking for a macro that will select the first blank (empty) cell in a given column please. Thanks, Mike |
Harald Staff wrote:
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" 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? ... I am looking for a macro that will select the first blank (empty) cell in a given column please. Thanks, Mike |
All times are GMT +1. The time now is 03:55 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com