Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() I searched and found a lot of posts on Deleting, but I'm still stuck There are 900+ rows in my table. Beginning with row 18, I'd like macro to find the end of the table, identify which rows have nothing i Colulmn B, and then delete all of those rows. Can anyone help? Than you -- marle ----------------------------------------------------------------------- marlea's Profile: http://www.excelforum.com/member.php...fo&userid=2620 View this thread: http://www.excelforum.com/showthread.php?threadid=50658 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Marlea,
Try: '============= Public Sub Tester() Dim LRow As Long LRow = Cells(Rows.Count, "B").End(xlUp) On Error Resume Next Range("B18:B" & LRow). _ SpecialCells(xlCellTypeBlanks).EntireRow.Delete On Error GoTo 0 End Sub '<<============= --- Regards, Norman "marlea" wrote in message ... I searched and found a lot of posts on Deleting, but I'm still stuck. There are 900+ rows in my table. Beginning with row 18, I'd like a macro to find the end of the table, identify which rows have nothing in Colulmn B, and then delete all of those rows. Can anyone help? Thank you. -- marlea ------------------------------------------------------------------------ marlea's Profile: http://www.excelforum.com/member.php...o&userid=26209 View this thread: http://www.excelforum.com/showthread...hreadid=506585 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Marlea,
LRow = Cells(Rows.Count, "B").End(xlUp) Should read: LRow = Cells(Rows.Count, "B").End(xlUp).Row --- Regards, Norman "Norman Jones" wrote in message ... Hi Marlea, Try: '============= Public Sub Tester() Dim LRow As Long LRow = Cells(Rows.Count, "B").End(xlUp) On Error Resume Next Range("B18:B" & LRow). _ SpecialCells(xlCellTypeBlanks).EntireRow.Delete On Error GoTo 0 End Sub '<<============= --- Regards, Norman |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Norman, this is fantastic. Thank you so much -- marle ----------------------------------------------------------------------- marlea's Profile: http://www.excelforum.com/member.php...fo&userid=2620 View this thread: http://www.excelforum.com/showthread.php?threadid=50658 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to delete empty rows in multiple column? | Excel Programming | |||
delete rows if value in column D is repeated | Excel Programming | |||
Delete all rows where Column A contains Text | Excel Worksheet Functions | |||
Delete All Rows That Column A value is not in Column A of Sheet2 | Excel Programming | |||
delete rows if dublicate cell value in column 2 | Excel Programming |