Delete Row if text or empty
Use the IsDate() function, for instance:
dim rng as Range
dim rngAll as Range
set rngAll = range("A1:A54") 'or whatever range
for each rng in rngAll
if IsDate(rng.Value) then
rng.EntireRow.Delete
End If
Next rng
Set rng = Nothing
Set rngAll = Nothing
"Terri Miller" wrote:
I have been going through past posts, and they are very helpful. However,
most of them speak to deleting rows with specific data or numbers. I would
like to write a macro that delets all rows in which column A is empty or has
anything other than a date format i.e. dd/mm/yy. Some cells have the text
"DATE", some have "___", some are empty, etc.
Thanks
|