Hi,
I have an issue regarding the Index;Match formula. The idea of the macro is to update the formula for some cells which are dependent on which sheet the user wish to do the measurements for. The macro looks like this:
The issue is the three lines containing the inde;match formula. The first four lines runs perfectly.
I am in need of some help here.. Please
Best Regards,
I have an issue regarding the Index;Match formula. The idea of the macro is to update the formula for some cells which are dependent on which sheet the user wish to do the measurements for. The macro looks like this:
Code:
Sub ReportTest4_FormulaUpdate()
ChooseYourSheet = InputBox("Please type sheetname for this combination", "Choose Sheet")
Worksheets("Report").Range("A2").Formula = "='" & ChooseYourSheet & "'!J1"
Worksheets("Report").Range("B2").Formula = "='" & ChooseYourSheet & "'!D3"
Worksheets("Report").Range("C2").Formula = "='" & ChooseYourSheet & "'!D4"
Worksheets("Report").Range("H2").Formula = "='" & ChooseYourSheet & "'!S10"
Worksheets("Report").Range("G2").Formula = "=INDEX('" & ChooseYourSheet & "'!P:P;MATCH('Raport'!H2;'" & ChooseYourSheet & "'!Q:Q;0))"
Worksheets("Report").Range("F2").Formula = "=INDEX('" & ChooseYourSheet & "'!O:O;MATCH('Raport'!H2;'" & ChooseYourSheet & "'!Q:Q;0))"
Worksheets("Report").Range("E2").Formula = "=INDEX('" & ChooseYourSheet & "'!K:K;MATCH('Raport'!H2;'" & ChooseYourSheet & "'!Q:Q;0))"
End Sub
The issue is the three lines containing the inde;match formula. The first four lines runs perfectly.
I am in need of some help here.. Please
Best Regards,