I'm trying to write in a procedure that will:
IF AL2, AM2, AN2 = "MATCH" THEN
range("AO").value = "MATCHES"
more or less, if the word "MATCH" is found in any of the cells AL2, AM2, or AN2 then I need AO2 to return "MATCHES". If not, then "NO MATCH"
then loop it.
THANKS GENTS
IF AL2, AM2, AN2 = "MATCH" THEN
range("AO").value = "MATCHES"
more or less, if the word "MATCH" is found in any of the cells AL2, AM2, or AN2 then I need AO2 to return "MATCHES". If not, then "NO MATCH"
then loop it.
THANKS GENTS
Code:
Sub step16nick()
Dim row As Double
Dim code1 As String
Dim code2 As String
Dim code3 As String
row = 2
Do Until Range("AD" & row).FormulaR1C1 = ""
code1 = Range("AD" & row).Value
code2 = Range("AE" & row).Value
code3 = Range("AF" & row).Value
If code1 = Range("AG" & row).Value Then Range("AL" & row).Value = "MATCH"
If code1 = Range("AH" & row).Value Then Range("AL" & row).Value = "MATCH"
If code1 = Range("AI" & row).Value Then Range("AL" & row).Value = "MATCH"
If code1 = Range("AJ" & row).Value Then Range("AL" & row).Value = "MATCH"
If code1 = Range("AK" & row).Value Then Range("AL" & row).Value = "MATCH"
If code2 = Range("AG" & row).Value Then Range("AM" & row).Value = "MATCH"
If code2 = Range("AH" & row).Value Then Range("AM" & row).Value = "MATCH"
If code2 = Range("AI" & row).Value Then Range("AM" & row).Value = "MATCH"
If code2 = Range("AJ" & row).Value Then Range("AM" & row).Value = "MATCH"
If code2 = Range("AK" & row).Value Then Range("AM" & row).Value = "MATCH"
If code3 = Range("AG" & row).Value Then Range("AN" & row).Value = "MATCH"
If code3 = Range("AH" & row).Value Then Range("AN" & row).Value = "MATCH"
If code3 = Range("AI" & row).Value Then Range("AN" & row).Value = "MATCH"
If code3 = Range("AJ" & row).Value Then Range("AN" & row).Value = "MATCH"
If code3 = Range("AK" & row).Value Then Range("AN" & row).Value = "MATCH"
row = row + 1
Loop
End Sub