ChristianDK
Programmer
Hello
I at trying to make a macro that adds a formula into an excel worksheet by combining text and values from the worksheet.
This works but will be inserted as text:
Range("JusteretEndelig!A1") = "VLOOKUP(A1;[kIM" & Range("JusteretEndelig!g1") & ".xls]JusteretEndelig!$A$1:$G$11;7;FALSE)"
The script i like to make is:
Range("JusteretEndelig!A1") = "=VLOOKUP(A1;[kIM" & Range("JusteretEndelig!g1") & ".xls]JusteretEndelig!$A$1:$G$11;7;FALSE)"
To point out the different in the to scripts it is the "=" in front of the formula.
Sadly it won't work, please help.
I at trying to make a macro that adds a formula into an excel worksheet by combining text and values from the worksheet.
This works but will be inserted as text:
Range("JusteretEndelig!A1") = "VLOOKUP(A1;[kIM" & Range("JusteretEndelig!g1") & ".xls]JusteretEndelig!$A$1:$G$11;7;FALSE)"
The script i like to make is:
Range("JusteretEndelig!A1") = "=VLOOKUP(A1;[kIM" & Range("JusteretEndelig!g1") & ".xls]JusteretEndelig!$A$1:$G$11;7;FALSE)"
To point out the different in the to scripts it is the "=" in front of the formula.
Sadly it won't work, please help.