Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Delete Empty Rows

lastrow = cells(rows.count,1).End(xlup).row
for i = lastrow to 1 step -1
if Application.CountA(rows(i)) = 0 then
rows(i).Delete
end if
Next

--
Regards,
Tom Ogilvy

"christian" wrote in message
...

Trying to write a macro that will read each row and if there is no data
- delete it. Thought I could use the EntireRow.delete but not having
any luck with it. (Excel 2002)

Now if only I could get the users to stop entering the blank rows...

Any help is appreciated.
-christian


--
christian
------------------------------------------------------------------------
christian's Profile:

http://www.excelforum.com/member.php...o&userid=14361
View this thread: http://www.excelforum.com/showthread...hreadid=261759



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
Hpw do I delete multiple empty rows found between filled rows? Bill Excel Worksheet Functions 2 November 15th 09 07:12 PM
delete empty rows aditya Excel Discussion (Misc queries) 1 June 3rd 09 12:58 PM
How to Delete empty rows in excel in b/w rows with values Dennis Excel Worksheet Functions 3 August 28th 07 04:15 PM
Cut filtered rows, paste into next empty row of new sheet, and delete cut rows Scott Excel Worksheet Functions 0 December 13th 06 01:25 AM
Delete empty rows ian123[_15_] Excel Programming 1 December 14th 03 02:35 PM


All times are GMT +1. The time now is 12:30 AM.

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

About Us

"It's about Microsoft Excel"