Code:
Dim foundOne As Range
Dim foundTwo As Range
On Error Resume Next
With Sheets("data")
Set foundOne = .Range("B2:B2501").Find(What:="9:30:00 AM", After:=.Range("b2"), LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=False)
If foundOne.Row > 1 Then
Range(.Range("B1"), foundOne.Offset(-1, 0)).EntireRow.Delete Shift:=xlUp
End If
Set foundTwo = .Range("B2:B0001").Find(What:="fini", After:=.Range("b2"), LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=False)
Range(foundTwo.Offset(1, 0), .Cells.SpecialCells(xlCellTypeLastCell)).Delete Shift:=xlUp
End With
On Error GoTo 0
How could I change this part to delete only cell A to G from those rows and shift up... Not deleting the full row.
I guess I need to change
Range(.Range("B1"), foundOne.Offset(-1, 0)).EntireRow.Delete
for something that select the rows above (from A to G) and do this:
Selection.Delete Shift:=xlUp
thanks