View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ron de Bruin Ron de Bruin is offline
external usenet poster
 
Posts: 11,123
Default Finding completely blank rows

You must also use CountA in VBA

If Application.CountA(.Rows(Lrow)) = 0 Then .Rows(Lrow).Delete
'This will delete the row if the whole row is empty (all columns)

See
http://www.rondebruin.nl/delete.htm



--
Regards Ron de Bruin
http://www.rondebruin.nl


"J Streger" wrote in message ...
I currently am writing a procedure to automatically delete rows that are
blank (and add new ones when needed. I'm trying to avoid using
worksheetfunction(counta) to determine if an entire row is blank as well as
looping through each cell in the row to see if there is data there. Is there
a way programatically to determine if any data exists in the given row? Thank
you.


--
*********************
J Streger
MS Office Master 2000 ed.
MS Project White Belt 2003