erimhast83
New Member
- Joined
- Jan 3, 2018
- Messages
- 14
Can anyone spot the error in my code causing the syntax error? I am trying to use a loop to replace all blank cells in column D with the word homeless until column B has a blank cell and then the loop will end.
Do Until IsEmpty(ActiveCell.Offset(-2, 0))
ActiveCell.Replace What:="", Replacement:="Homeless", LookAt:=xlPart,
SearchOrder:=xlByColumns, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Cells.FindNext(After:=ActiveCell).Activate
Loop
Do Until IsEmpty(ActiveCell.Offset(-2, 0))
ActiveCell.Replace What:="", Replacement:="Homeless", LookAt:=xlPart,
SearchOrder:=xlByColumns, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Cells.FindNext(After:=ActiveCell).Activate
Loop