I have a For loop in which I pass 2 values to 2 variables ( Origin & Destination),then I want to test the equality of a range and these variables in a array formula. Here's my code:
For cnt = 1 To RowsNum
Origin = O_Col.Cells(cnt, 1).Value
Destination = D_Col.Cells(cnt, 1).Value
Links.Cells(cnt, 5).Select
Selection.FormulaArray = _
"=INDEX(C3,MATCH(1,(R1C1:R9C1 = Origin)*(R1C2:R9C2 = Destination),0))"
Next cnt
When I run this code, the answer is N/A! I think the problem lies in the equality part!
I'd appreciate any help!
Bookmarks