LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Howcan I delete blank rows efficiently

Question from VB novice...

Can someone suggest how to make the follwoing macro more efficient ?

It will process 40K plus rows and is very slow.

I've tried adjusting the chunk processing size from, 100 to 5000. Smaller
chunk appears to be faster.

All suggestions welcome...

thanks in advance...


Dim Rng As Range
Dim RawDataRowNdx As Long
Dim LastRowOfRawData As Long
' Turn Screen Updateing and sheet Calculation OFF to go faster
'
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
'
' Set sheet to Raw Data Area sheet
'
Sheets("Raw Data Area").Select
'
' Find Last Row of Data
LastRowOfRawData = ActiveSheet.Cells(Rows.Count, "A").End(xlUp).Row


'
' Delete All Blank Rows in 100 row chunks
'
For RawDataRowNdx = 100 To LastRowOfRawData Step 100
Range("N1:N" & RawDataRowNdx).SpecialCells(xlBlanks).EntireRow.De lete
Application.StatusBar = RawDataRowNdx & "K Records Processed... Still
Working!!!"
Next RawDataRowNdx
 
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
Delete blank rows if more than one Kjellk Excel Discussion (Misc queries) 5 June 10th 09 06:17 AM
Delete Blank Rows Heather Excel Discussion (Misc queries) 9 July 15th 08 09:32 PM
delete blank rows Pam C Excel Discussion (Misc queries) 1 January 17th 06 07:13 PM
Delete blank rows djh Excel Programming 2 October 26th 04 02:17 PM
Delete blank row only if 2 consecutive blank rows Amy Excel Programming 2 October 21st 04 05:24 PM


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