Sub Find_Text_Strings()
Dim FindString1 As String, FindString2 As String
Dim String1 As Boolean, String2 As Boolean
Dim Rng As Range
FindString1 = "Awages"
FindString2 = "ATotal"
String1 = False
String2 = False
' Check for Awages as FindString1
With Sheets("Sheet1").Range("A5:A100")
Set Rng = .Find(What:=FindString1, _
After:=.Cells(.Cells.Count), _
LookIn:=xlValues, _
LookAt:=xlWhole, _
SearchOrder:=xlByRows, _
SearchDirection:=xlNext, _
MatchCase:=False)
If Not Rng Is Nothing Then
String1 = True
End If
End With
' Check for Atotal as String2
With Sheets("Sheet1").Range("A5:A100")
Set Rng = .Find(What:=FindString2, _
After:=.Cells(.Cells.Count), _
LookIn:=xlValues, _
LookAt:=xlWhole, _
SearchOrder:=xlByRows, _
SearchDirection:=xlNext, _
MatchCase:=False)
If Not Rng Is Nothing Then
String2 = True
End If
End With
If String1 = True Then
If String2 = True Then
Rows("5:100").EntireRow.Hidden = True
Else
MsgBox "Both text items Awages and Atotal were not found"
End If
Else
MsgBox "Both text items Awages and Atotal were not found"
End If
End Sub