Sub go() Dim i As Integer, Cell As Range, Cell2 As Range i = 1 'This will Search Sheet1 Column1 'and set the value to cell next Do Until ThisWorkbook.Sheets(1).Cells(i, 1).Value = "" Set Cell = ThisWorkbook.Sheets(1).Cells(i, 1) Set Cell2 = ThisWorkbook.Sheets(1).Cells(i, 2) If Cell.Value = "TOTAL LINE" Then Cell2.Value = "a" End If i = i + 1 Loop End Sub