Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Thanks to the Disscusion groups I found the following to delete blank rows:
Sub macro_der() Dim i As Long, nLastRow As Long Set r = ActiveSheet.UsedRange nLastRow = r.Rows.Count + r.Row - 1 Set r = Rows(nLastRow + 1) For i = 1 To nLastRow If Application.CountA(Rows(i)) = 0 Then Set r = Union(r, Rows(i)) End If Next r.Delete End Sub It works perfect and I know want to use it in past or future workbooks. Figured I could copy and paste in the V.B. Editor, but is there another/easier way to use this globally? Using Excel 2003. -- Thank you, Christine |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
CAPITALISE GLOBALLY | Excel Discussion (Misc queries) | |||
Globally replacing * | Excel Discussion (Misc queries) | |||
CLASS MODULE & SIMPLE MODULE | Excel Discussion (Misc queries) | |||
Can I globally add to a worksheet? | Excel Worksheet Functions | |||
code in module A to not execute a Worksheet_SelectionChange sub of another module | Excel Discussion (Misc queries) |