Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Delete all rows where column A is blank
I need to write a macro to delete all rows where column A is blank. Can
anyone help me with this please? -- Thank you, Jodie |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Delete all rows where column A is blank
Try some code like the following. Change the value "Sheet1" to the
appropriate worksheet name. Sub AAA() Dim LastRow As Long Dim RowNdx As Long Dim WS As Worksheet Set WS = Worksheets("Sheet1") With WS LastRow = .UsedRange.SpecialCells(xlCellTypeLastCell) _ .EntireRow.Cells(1, "A") For RowNdx = LastRow To 1 Step -1 If .Cells(RowNdx, "A").Value = vbNullString Then .Rows(RowNdx).Delete End If Next RowNdx End With End Sub Cordially, Chip Pearson Microsoft MVP 1998 - 2010 Pearson Software Consulting, LLC www.cpearson.com [email on web site] On Thu, 10 Dec 2009 13:59:01 -0800, Jodie wrote: I need to write a macro to delete all rows where column A is blank. Can anyone help me with this please? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Delete all rows where column A is blank
Try this
Range("A:A").SpecialCells(xlCellTypeBlanks).Entire Row.Delete "Jodie" wrote in message ... I need to write a macro to delete all rows where column A is blank. Can anyone help me with this please? -- Thank you, Jodie |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Delete all rows where column A is blank
Warning: Look out with SpecialCells
See http://www.rondebruin.nl/specialcells.htm -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Homey" <noname wrote in message ... Try this Range("A:A").SpecialCells(xlCellTypeBlanks).Entire Row.Delete "Jodie" wrote in message ... I need to write a macro to delete all rows where column A is blank. Can anyone help me with this please? -- Thank you, Jodie |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Delete all rows where column A is blank
Do you really need a macro?
Select column A F5SpecialBlanksOK EditDeleteEntire Row Gord Dibben MS Excel MVP On Thu, 10 Dec 2009 13:59:01 -0800, Jodie wrote: I need to write a macro to delete all rows where column A is blank. Can anyone help me with this please? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Delete rows if column looks blank | Excel Programming | |||
delete the non blank rows depending on Column | Excel Programming | |||
Delete Blank Rows - specify column via dialog | Excel Programming | |||
Delete Rows if any cell in Column H is blank but do not Delete Fir | Excel Programming | |||
Delete entire rows where there is a blank in column A | Excel Programming |