Home |
Search |
Today's Posts |
#11
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The A is the column
The P is letter you are looking for to delete Although Tom's has worked, I input a forward slash after the A. It should have been just A as below Any rows with the letter P in column A will be removed via this procedure Copy and paste this code exactly as it is and it will be a sub on its own place this line call delProws within your macro where you would like it to perform This scripts deletes all rows that contain the letter P within column A Private sub delProws Dim LastRow As Long Dim RowNdx As Long Dim OldVal As String LastRow = Cells(Rows.Count, "A").End(xlUp).Row For RowNdx = LastRow To 1 Step -1 If Left(Cells(RowNdx, "A"), 1) = "P" Then Rows(RowNdx).Delete End If Next RowNdx end sub -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...mming/200602/1 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro to delete sheets and saves remaining file does not properly delete module | Excel Programming | |||
Macro to delete sheets and saves remaining file does not properly delete module | Excel Programming | |||
Macro to delete sheets and saves remaining file does not properly delete module | Excel Programming | |||
Macro to delete sheets and saves remaining file does not properly delete module | Excel Programming | |||
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 |