I use this code to find a cell that contains the text"Data:" then delete everything that follows to the Last Cell.
I would like to change this in order to delete everything preceding this cell or in other words to the First cell.
I'm thinking it's two steps after finding the cell.
Active Cell move up 1
Then Select Active cell to first cell then delete.
any suggestions would be appreciated
I would like to change this in order to delete everything preceding this cell or in other words to the First cell.
I'm thinking it's two steps after finding the cell.
Active Cell move up 1
Then Select Active cell to first cell then delete.
any suggestions would be appreciated
HTML:
Sub FindData()
With Range("B:K")
Cells.Find(what:="Data:", After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _
xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False) _
.Activate
Range(Selection, ActiveCell.SpecialCells(xlLastCell)).Select
Selection.EntireRow.Delete
End With
End Sub