View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Eric White[_2_] Eric White[_2_] is offline
external usenet poster
 
Posts: 45
Default 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