I have created VBA that opens another excel and takes value from another cells. I use index, indirect function:
ActiveCell.FormulaR1C1 = _
"=IF(RC[-13]=0,"""",IFERROR(INDEX(INDIRECT(""'[excel 2020 07 BB_v1.xlsm]""&MID(CELL(""filename"",R1C1),FIND(""]"",CELL(""filename"",R1C1))+1,255)&""'!$N$2:$N$512""),MATCH(RC[-13],INDIRECT(""'[excel 2020 07 BB_v1.xlsm]""&MID(CELL(""filename"",R1C1),FIND(""]"",CELL(""filename"",R1C1))+1,255)&""'!$A$2:$A$512""),0)),""N/A""))"
Range("N2").Select
I want to assign the cell with the excel name that I will not need to change every time the title of the name (excel 2020 07) in the code. Could you please help me?
Thank you