Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Conditional row delete

I need help writing a macro to remove rows from a large
spreadsheet where the cells in columns E# - AI is blank.
All 31 cells on the row must be blank before the entire
row can be removed. Columns A# - D# will always have
values. The spreadsheet has approximately 2300 rows to
search.

Thanks,
Penny
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 634
Default Conditional row delete

Slightly edited one of John Walkenbach's will hopefully do it.

Sub DeleteEmptyRows()
lastrow = ActiveSheet.UsedRange.Row - 1 + _
ActiveSheet.UsedRange.Rows.Count
Application.ScreenUpdating = False
For r = lastrow To 1 Step -1
If Application.CountA(Cells(r, 5).Resize(1, 31)) = 0 Then Rows(r).Delete
Next r
End Sub


--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL2K & XLXP

----------------------------------------------------------------------------
Attitude - A little thing that makes a BIG difference
----------------------------------------------------------------------------



"Penny" wrote in message ...
I need help writing a macro to remove rows from a large
spreadsheet where the cells in columns E# - AI is blank.
All 31 cells on the row must be blank before the entire
row can be removed. Columns A# - D# will always have
values. The spreadsheet has approximately 2300 rows to
search.

Thanks,
Penny



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
Conditional Delete Statement chrisjack001 Excel Worksheet Functions 0 September 9th 10 08:36 PM
Conditional delete (reposting). tom[_2_] Excel Discussion (Misc queries) 8 November 1st 09 10:41 PM
Conditional delete tom[_2_] Excel Discussion (Misc queries) 2 October 15th 09 10:44 PM
delete conditional formatting via macro mohavv Excel Discussion (Misc queries) 1 August 27th 08 11:57 PM
Conditional Delete [email protected] New Users to Excel 3 May 25th 07 03:25 AM


All times are GMT +1. The time now is 09:31 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"