Option Explicit
Sub DeleteMyRows()
Dim Rng As Range, Cell As Range
Dim lr As Long, i As Long
Dim trm As String
lr = Range("AG" & Rows.Count).End(xlUp).Row 'finds the last row in column AG
trm = 1
For i = Rows.Count To 2 Step -1 'Goes to the bottom of the used rows in AG and
'tests each row, going up, one row at a time. That's the
'Step -1. It stops at Row [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=2]#2[/URL] ... Rows.Count to 2
'last row to row [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=2]#2[/URL] .
If Range("AG" & i) = trm Then 'Looking for "trm" which was set up above as the number 1
'If "trm" is located in Col AG then
Range("AG" & i).EntireRow.Delete 'Delete that entire row where 1 is found. The variable " i "
'is the row
End If
Next i 'This searching starts with "For i = ..." above goes thru
'the code looking at the last used row, then "Next i" tells it
'to go back up and start again at "For i = ..." but this time
'it will be one row less or towards the top "Step - 1"
End Sub