Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dayton
try this: Sub DeleteRow2() Dim LastRow As Long Dim i As Long LastRow = Range("A65536").End(xlUp).Row For i = LastRow To 1 Step -1 If Range("A" & i).Value Like "bo501*" Then Range("A" & i).EntireRow.Delete End If Next 'i End Sub Regards Trevor "dayton" wrote in message ... How would I modify this to delete rows where the text in the rows begins with "bo501" followed my more text. I tried using "bo501*". Thanks "Cole" wrote in message ... Sub deleteRow() Range("a1").Select Do Until ActiveCell.Address = "$A$10" 'to whichever cell is ending If ActiveCell.Value = "bo501" Then Rows(ActiveCell.Row).Delete Else ActiveCell.Offset(1, 0).Select End If Loop End Sub "dayton" wrote in message ... I need my macro to delete rows that start with specfic data, not clear the row but delete. If row begins with text "bo501" delete. T.I.A. Dayton |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Hpw do I delete multiple empty rows found between filled rows? | Excel Worksheet Functions | |||
How to Delete empty rows in excel in b/w rows with values | Excel Worksheet Functions | |||
Cut filtered rows, paste into next empty row of new sheet, and delete cut rows | Excel Worksheet Functions | |||
How to delete rows when List toolbar's "delete" isnt highlighted? | Excel Worksheet Functions | |||
delete empty rows between rows with text | Excel Discussion (Misc queries) |