Sub FindMatchingText() Dim i As Integer, TextToFind As String TextToFind = "CA5" For i = 1 To 500 If Sheets("Hotel Booking").Cells(i, "AB" + i, "BB").Value = TextToFind Then MsgBox ("Found text on row" & i) Exit Sub End If Next i MsgBox ("Text not found") End Sub