Hi
I am running an excel macro to search for text then delete if found as below. However its also deleting lines with the text "11 order(s)" - is there a way I can specific set to avoid this?
Sub A_Mainsort()
Rows(1).EntireRow.Delete
Rows(1).EntireRow.Delete
Rows(1).EntireRow.Delete
Rows(1).EntireRow.Delete
Rows(1).EntireRow.Delete
Rows(1).EntireRow.Delete
Rows(1).EntireRow.Delete
Rows(1).EntireRow.Delete
Columns("D:I").Delete
Columns("A:C").HorizontalAlignment = xlCenter
Columns("A:C").AutoFit
Dim c As Range
Dim SrchRng
Set SrchRng = ActiveSheet.Range("B1", ActiveSheet.Range("B65536").End(xlUp))
Do
Set c = SrchRng.Find[highlight #FCE94F]("1 order(s)",[/highlight] LookIn:=xlValues)
If Not c Is Nothing Then c.EntireRow.Delete
Loop While Not c Is Nothing
End Sub
I am running an excel macro to search for text then delete if found as below. However its also deleting lines with the text "11 order(s)" - is there a way I can specific set to avoid this?
Sub A_Mainsort()
Rows(1).EntireRow.Delete
Rows(1).EntireRow.Delete
Rows(1).EntireRow.Delete
Rows(1).EntireRow.Delete
Rows(1).EntireRow.Delete
Rows(1).EntireRow.Delete
Rows(1).EntireRow.Delete
Rows(1).EntireRow.Delete
Columns("D:I").Delete
Columns("A:C").HorizontalAlignment = xlCenter
Columns("A:C").AutoFit
Dim c As Range
Dim SrchRng
Set SrchRng = ActiveSheet.Range("B1", ActiveSheet.Range("B65536").End(xlUp))
Do
Set c = SrchRng.Find[highlight #FCE94F]("1 order(s)",[/highlight] LookIn:=xlValues)
If Not c Is Nothing Then c.EntireRow.Delete
Loop While Not c Is Nothing
End Sub