Hi,
I am trying to code the following formula, a combination of IFERROR, INDEX, and Match, in VBA. Unfortunately, the code below does not work. Your help will be fully appreciated.
Dim i As Long
For i = 2 To X
Range("D" & i & ":BJ" & i & "").Select
Selection.FormulaR1C1 =_
"{=IFERROR(INDEX('Sheet2'!R" & i & "C3:R" & i & "C74,MATCH(TRUE,'Sheet2'!R" & i & "C3:R" & i & "C74='Sheet3'!R" & i & "C3,0)+'Sheet'!R1C3),0)}"
ActiveCell.Offset(1, 0).Select
Next i
Best,
Matt
I am trying to code the following formula, a combination of IFERROR, INDEX, and Match, in VBA. Unfortunately, the code below does not work. Your help will be fully appreciated.
Dim i As Long
For i = 2 To X
Range("D" & i & ":BJ" & i & "").Select
Selection.FormulaR1C1 =_
"{=IFERROR(INDEX('Sheet2'!R" & i & "C3:R" & i & "C74,MATCH(TRUE,'Sheet2'!R" & i & "C3:R" & i & "C74='Sheet3'!R" & i & "C3,0)+'Sheet'!R1C3),0)}"
ActiveCell.Offset(1, 0).Select
Next i
Best,
Matt