I'm trying to insert an index equation from VBA into cells in a table, but when I run the code it adds "@" operators to the front of the indexed worksheet names. Example:
Range("V14") = "=INDEX(SCHEDULES!$F$7:$F$62,MATCH('DESIGN CONDITIONS'!$H14&'DESIGN CONDITIONS'!D14,SCHEDULES!$K$7:$K$92&SCHEDULES!$E$7:$E$92,0))"
but the equation input into the cell comes out
INDEX(SCHEDULES!$F$7:$F$62,MATCH('DESIGN CONDITIONS'!$H14&'DESIGN CONDITIONS'!C14,@SCHEDULES!$K$7:$K$92&@SCHEDULES!$E$7:$E$92,0))
with "@" operators added to the "schedules" worksheet reference. The equation works as intended, but breaks when "@" is added.
I've tried breaking up and re-combining the text in the equation at the "@" operator, assigning the equation to a variable with various assignments, and copying the correct equation from a specific cell in the worksheet. I looked online and it appears "@" is used as an implicit intersection to make equations work like they did in Excel 2016. Does anyone know an easy workaround to prevent this "@" from being added to equations when going from VBA --> worksheets?