Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Detect whether a row is completely empty

I would appreciate any of your help in the following:
How can it be detected whether all cells in a row are completely empty?
In this case I want to delete empty rows.
Thanks very much for your attention and/or reply and best regards,
Cor Steeghs




  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 320
Default Detect whether a row is completely empty

For n=Range("A65536").end(xlup).row to 1 step -1
If Application.Counta(Rows(n))=0 then Rows(n).Delete
next

A live, online Excel Master Class is starting in September (which I'm
teaching).
For details, please follow this link:

http://www.iil.com/str_link_all_resu...ect_cartid=395


Bob Umlas
Excel MVP


"Cor Steeghs" wrote in message
...
I would appreciate any of your help in the following:
How can it be detected whether all cells in a row are completely empty?
In this case I want to delete empty rows.
Thanks very much for your attention and/or reply and best regards,
Cor Steeghs






  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 576
Default Detect whether a row is completely empty

Cor,

Dim x as Long
Dim lrow as Long

lrow = Cells(Rows.COUNT, "A").End(xlUp).Offset(1, 0).Row
' determine number of rows

For x = lrow to 1 step -1
If Worksheetfunction.Counta(Rows(x)) = 0 then
Rows(x).EntireRow.Delete
End if
Next

steve

"Cor Steeghs" wrote in message
...
I would appreciate any of your help in the following:
How can it be detected whether all cells in a row are completely empty?
In this case I want to delete empty rows.
Thanks very much for your attention and/or reply and best regards,
Cor Steeghs






  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Detect whether a row is completely empty

for i = 10 to 1 step -1
if application.CountA(cells(i,1).EntireRow) = 0 then
cells(i,1).EntireRow.Delete
end if
Next


--
Regards,
Tom Ogilvy

"Cor Steeghs" wrote in message
...
I would appreciate any of your help in the following:
How can it be detected whether all cells in a row are completely empty?
In this case I want to delete empty rows.
Thanks very much for your attention and/or reply and best regards,
Cor Steeghs






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
need to detect syntax in value J.Parker Excel Discussion (Misc queries) 1 February 13th 10 05:09 AM
I am completely fed up!! kate Charts and Charting in Excel 2 May 22nd 07 04:22 PM
vlookup almost does this but not completely... newToExcel Excel Worksheet Functions 1 September 13th 05 01:07 AM
Completely Stumped ZimBoy Excel Discussion (Misc queries) 1 June 28th 05 11:39 AM
Completely Locked Out BlessedSoul Excel Discussion (Misc queries) 1 June 26th 05 11:16 PM


All times are GMT +1. The time now is 03:50 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"