I've been stuck on this for a while now, I hope someone can help. I have the following line in VBA which works.
I need to replace the range $V:$V because different sheets require different columns as a reference. I have a variable that will change depending on the sheet. How can I work it into the formula using the correct syntax?![]()
ActiveSheet.Cells(2, 3).Formula = "=INDEX(Matrix!D:D,MATCH(" & ActSheet & "!$A2,Matrix!$A:$A,0))*INDEX(Matrix!$V:$V, MATCH(" & ActSheet & "!C$1,Matrix!$S:$S,0))"
Any help is greatly appreciated!
Thanks!
Maria
Bookmarks