Good day,
I'm using a simple loop to remove unwanted spaces from a list of imported data in a single column.
Code
Counter = 0
Do Until Selection.Offset(Counter, 0).Row > 5000
Cells.Find(What:="__,______", After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False, SearchFormat:=False).Activate
Selection.Delete Shift:=xlUp
Loop
My question, how can I stop the loop by checking for an empty cell, instead of using an arbitrary range?
I have about a dozen data files I need to process and each of them varies in size (file length). I would like to nest several of these loops to help me clean up the raw data.
Thanks for your help,
David Roye