I cannot figure out why my IF statement won't populate the matches in the highlighted cells from the image above. Any thoughts?
Code:
Do Until Range("AQ" & row).Formula = ""
match1 = ""
match2 = ""
match3 = ""
code1 = Range("AQ" & row).Value
code2 = Range("AR" & row).Value
code3 = Range("AS" & row).Value
If code1 = Range("AT" & row).Value Then match1 = "MATCH" 'if AQ matches AT, then MATCH1 = match
If code1 = Range("AU" & row).Value Then match1 = "MATCH" 'if AQ matches AU, then MATCH1 = match
If code1 = Range("AV" & row).Value Then match1 = "MATCH" 'if AQ matches AV, then MATCH1 = match
If code1 = Range("AW" & row).Value Then match1 = "MATCH" 'if AQ matches AW, then MATCH1 = match
If code1 = Range("AX" & row).Value Then match1 = "MATCH" 'if AQ matches AX, then MATCH1 = match
If code2 = Range("AT" & row).Value Then match2 = "MATCH" 'if AR matches AT, then MATCH2 = match
If code2 = Range("AU" & row).Value Then match2 = "MATCH" 'if AR matches AU, then MATCH2 = match
If code2 = Range("AV" & row).Value Then match2 = "MATCH" 'if AR matches AV, then MATCH2 = match
If code2 = Range("AW" & row).Value Then match2 = "MATCH" 'if AR matches AW, then MATCH2 = match
If code2 = Range("AX" & row).Value Then match2 = "MATCH" 'if AR matches AX, then MATCH2 = match
If code3 = Range("AT" & row).Value Then match3 = "MATCH" 'if AS matches AT, then MATCH3 = match
If code3 = Range("AU" & row).Value Then match3 = "MATCH" 'if AS matches AU, then MATCH3 = match
If code3 = Range("AV" & row).Value Then match3 = "MATCH" 'if AS matches AV, then MATCH3 = match
If code3 = Range("AW" & row).Value Then match3 = "MATCH" 'if AS matches AW, then MATCH3 = match
If code3 = Range("AX" & row).Value Then match3 = "MATCH" 'if AS matches AX, then MATCH3 = match
If match1 = "MATCH" Then
Range("BD" & row).Value = "MATCH"
If match2 = "MATCH" Then
Range("BE" & row).Value = "MATCH"
[COLOR=#ff0000] If match3 = "MATCH" Then
Range("BF" & row).Value = "MATCH"[/COLOR]
Else
Range("BG" & row).Value = "NO MATCH"
End If
End If
End If
If Range("BD" & row).Value = "" Then
If Range("BE" & row).Value = "" Then
If Range("BF" & row).Value = "" Then
Range("BG" & row).Value = "NO MATCH"
End If
End If
End If
row = row + 1
Loop