Dear Experts,
I have found the below code after lot of search that solves my problem. In its current form it runs on one sheet at a time ( I have 50 plus sheets).
Help I need it to modify it in such a way that it runs on all the worksheets of the active workbook.
Please help help/advise…..
Best Regards/VKS
![]()
Sub test() Dim foundOne As Range Dim foundTwo As Range On Error Resume Next With Workbooks("Testing Yield Report").Sheets("ABC") Set foundOne = .Range("A:A").Find(What:="1 Analysis", After:=.Range("a1"), LookIn:=xlFormulas, _ LookAt:=xlPart, SearchOrder:=xlByRows, _ SearchDirection:=xlNext, MatchCase:=False) If foundOne.Row > 1 Then Range(.Range("a1"), foundOne.Offset(-1, 0)).EntireRow.Delete shift:=xlUp End If Set foundTwo = .Range("A:A").Find(What:="2 Analysis", After:=.Range("a1"), 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 End Sub











LinkBack URL
About LinkBacks
Register To Reply
Bookmarks