LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default Deleting empty rows

Hi Ron

Thanks very much, that worked a treat

Cheers
Fos

----- Ron de Bruin wrote: ----

Try this Fos

Sub Example1(
Dim Firstrow As Lon
Dim Lastrow As Lon
Dim Lrow As Lon
Dim CalcMode As Lon

With Applicatio
CalcMode = .Calculatio
.Calculation = xlCalculationManua
.ScreenUpdating = Fals
End Wit

Firstrow = ActiveSheet.UsedRange.Cells(1).Ro
Lastrow = ActiveSheet.UsedRange.Rows.Count + Firstrow -
With ActiveShee
.DisplayPageBreaks = Fals
For Lrow = Lastrow To Firstrow Step -

If Application.CountA(.Rows(Lrow)) = 0 Then .Rows(Lrow).Delet
'This will delete the row if the whole row is empty (all columns

Nex
End Wit
With Applicatio
.ScreenUpdating = Tru
.Calculation = CalcMod
End Wit
End Su


--
Regards Ron de Brui
http://www.rondebruin.n


"Foss" wrote in message ..
Good afternoon all
Does anyone have something nice and quick that can delete all empty rows in the UsedRange
Thanks for your time

Fos






 
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
Deleting empty rows Felix New Users to Excel 1 February 3rd 09 07:48 AM
deleting empty rows EngelseBoer Excel Discussion (Misc queries) 3 September 7th 08 01:09 AM
Deleting empty rows automatically Bigweed Excel Discussion (Misc queries) 2 September 13th 06 09:39 PM
Deleting All Empty Rows bodhisatvaofboogie Excel Discussion (Misc queries) 3 May 18th 06 12:36 PM
Deleting unwanted and empty rows... Jim Excel Discussion (Misc queries) 2 July 4th 05 11:12 PM


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