For some reason, the below snippet of code inserts a formula where the lookup value for the match functions actually refers to cell RC1, rather than the first column of the sheet and the row of the active cell. Does anyone know why this code would do this? I think it has something to do with the named arrays in the functions, but I'm not sure. Thanks in advance!
Code:
With Sheets("Control").Cells(LastRow1 * 2 - 2, 2)
.Formula = _
"=INDEX(Exposures,MATCH(RC1,ME_Dates,0),COLUMN())*INDEX(Weights,MATCH(RC1,MW_Dates,0),COLUMN())"
.NumberFormat = "0.0%"
.HorizontalAlignment = xlRight
End With