Hi Team,
I am hoping one of you can share your wisdom about solving this puzzle please. I have a dynamic range to select and the range includes empty cells. The problem is that sometimes the range stops once it finds the first empty cell in the column and ignore the data it is supposed to pick up below the empty cell. I have benn using the code below but the section "Range(Selection, Selection.End(xlDown)).Select" does not do the job when it finds an empty cell in the column. I know I can use other methods (e.g. lastRow) but they work with known cells.
Could you please assist me improving this code so it includes empty cell?
Thank you!
I am hoping one of you can share your wisdom about solving this puzzle please. I have a dynamic range to select and the range includes empty cells. The problem is that sometimes the range stops once it finds the first empty cell in the column and ignore the data it is supposed to pick up below the empty cell. I have benn using the code below but the section "Range(Selection, Selection.End(xlDown)).Select" does not do the job when it finds an empty cell in the column. I know I can use other methods (e.g. lastRow) but they work with known cells.
Could you please assist me improving this code so it includes empty cell?
VBA Code:
Sheets("Input").Select
Range("A1:J1").Select
Selection.Find(What:="Country", After:=ActiveCell, LookIn:=xlFormulas2, _
Lookat:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Offset(1, 0).Select
Range(Selection, Selection.End(xlDown)).Select
Thank you!