I have the following named ranges (some of which are INDEX/MATCH dynamic ranges) and their accompanying formulas that are present in my workbook's Name Manager:
- Q1_BusinessWorkd_ID ='Q1 Data'!$C$35:INDEX('Q1 Data'!$G$35:$G$1048576,MATCH("zzzzz",'Q1 Data'!$C$35:$C$1048576,1)-1)
- Q1_Data ='Q1 Data'!$B$35:INDEX('Q1 Data'!$CF$35:$CF$1048576,MATCH("zzzzz",'Q1 Data'!$C$35:$C$1048576,1))
- Q1_Data_Start ='Q1 Data'!$B$35
- Q1_Row1_Column_Formulas ='Q1 Data'!$H$35:$CF$35
- Q1_Vlookup_Data ='Q1 Data'!$C$35:INDEX('Q1 Data'!$CF$35:$CF$1048576,MATCH("zzzzz",'Q1 Data'!$C$35:$C$1048576,1))
The formulas that DON'T contain the INDEX and MATCH statements can be added to the workbook's Named Ranges using the folowing VBA code:
ActiveWorkbook.Names.Add Name:="Q1_Data_Start", RefersTo:="='Q1 Data'!$B$35"
ActiveWorkbook.Names.Add Name:="Q1_Row1_Column_Formulas", RefersTo:="='Q1 Data'!$H$35:$CF$35"
However, the formulas that contain the INDEX and MATCH statements generate a compile syntax error. I have no idea how to correct the syntax of the INDEX - MATCH formulas to not generate the syntax error.
Anyone know how to correct this problem?