Hi Guys,
I worked on a code over the weekend on my computer at home, which has Excel 2016. This code worked over the weekend on my computer at home, but I haven't been able to get it to run on my work computer (Excel 2013).
I'm not sure the differences in Excel builds are the problem... The code just doesn't run... at all. It doesn't throw errors... After I press F5, nothing happens.... no hour glass, no nothing. Does anyone see something in this code that I don't?
Thank you Gentleman!
I worked on a code over the weekend on my computer at home, which has Excel 2016. This code worked over the weekend on my computer at home, but I haven't been able to get it to run on my work computer (Excel 2013).
I'm not sure the differences in Excel builds are the problem... The code just doesn't run... at all. It doesn't throw errors... After I press F5, nothing happens.... no hour glass, no nothing. Does anyone see something in this code that I don't?
Code:
Sub Step16()
'*************CODE DOES NOT RUN.... WHY?***************
Dim row As Double
Dim code1 As String
Dim code2 As String
Dim code3 As String
Dim match1 As String
Dim match2 As String
Dim match3 As String
row = 2
match1 = ""
match2 = ""
match3 = ""
Do Until Range("AK" & row).FormulaR1C1 = ""
code1 = Range("AK" & row).Value = "VLOOKUP(C2,IMP.SPL!$A$2:$D$44,2,0)"
code2 = Range("AL" & row).Value = "VLOOKUP(C2,IMP.SPL!$A$2:$D$44,3,0)"
code3 = Range("AM" & row).Value = "VLOOKUP(C2,IMP.SPL!$A$2:$D$44,4,0)"
If code1 = Range("AN" & row).Value Then match1 = "MATCH"
If code1 = Range("AO" & row).Value Then match1 = "MATCH"
If code1 = Range("AP" & row).Value Then match1 = "MATCH"
If code1 = Range("AQ" & row).Value Then match1 = "MATCH"
If code1 = Range("AR" & row).Value Then match1 = "MATCH"
If code2 = Range("AN" & row).Value Then match2 = "MATCH"
If code2 = Range("AO" & row).Value Then match2 = "MATCH"
If code2 = Range("AP" & row).Value Then match2 = "MATCH"
If code2 = Range("AQ" & row).Value Then match2 = "MATCH"
If code2 = Range("AR" & row).Value Then match2 = "MATCH"
If code3 = Range("AN" & row).Value Then match3 = "MATCH"
If code3 = Range("AO" & row).Value Then match3 = "MATCH"
If code3 = Range("AP" & row).Value Then match3 = "MATCH"
If code3 = Range("AQ" & row).Value Then match3 = "MATCH"
If code3 = Range("AR" & row).Value Then match3 = "MATCH"
If match1 = "MATCH" Then
Range("AS" & row).Value = "MATCHES"
Else
If match2 = "MATCH" Then
Range("AS" & row).Value = "MATCHES"
Else
If match3 = "MATCH" Then
Range("AS" & row).Value = "MATCHES"
Else
Range("AS" & row).Value = "NO MATCHES"
End If
End If
End If
row = row + 1
Loop
End Sub
Thank you Gentleman!