Home |
Search |
Today's Posts |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
in any event, maybe you can amend this coding:
====================== Option Explicit Sub Lars() Dim myLastRow As Long Dim r As Long Dim c As Range myLastRow = ActiveSheet.Cells(10000, 1).End(xlUp).Row For r = myLastRow To 1 Step -1 Set c = ActiveSheet.Range("a" & r) If c.Value = "" Then c.EntireRow.Delete End If Next r End Sub ========================= it looks at column A for blanks and uses the bottom of the range as being the last populated cell in column A. if you changed myLastRow to 1 to myLastRow to 2 then you'd keep row 1, your header row. hope it helps. susan On Jul 21, 11:17*am, Lars Uffmann wrote: Hi everyone! What I want to do is basically * * Worksheet.Rows.Delete xlShiftUp except that I do not want to delete the headings row. So something like * * Worksheet.Rows.Delete (2) to delete starting from row 2, without having to provide the end of the range that I am deleting. Simple question - is there a simple answer? Thanks! * * Lars |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Hpw do I delete multiple empty rows found between filled rows? | Excel Worksheet Functions | |||
Delete Rows if any cell in Column H is blank but do not Delete Fir | Excel Programming | |||
Copy pasting Rows, but need to Delete any Shapes/Pictures that are within copied rows | Excel Programming | |||
How to delete rows when List toolbar's "delete" isnt highlighted? | Excel Worksheet Functions | |||
Delete every 3rd row, then delete rows 2-7, move info f/every 2nd row up one to the end and delete the row below | Excel Programming |