ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Finding completely blank rows (https://www.excelbanter.com/excel-programming/345688-finding-completely-blank-rows.html)

J Streger

Finding completely blank rows
 
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


Ron de Bruin

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




Gary Keramidas

Finding completely blank rows
 
here's a link someone posted earlier today

http://www.mvps.org/dmcritchie/excel...emoveEmptyRows

--


Gary


"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





All times are GMT +1. The time now is 09:31 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com