I want to make a list of sheet names in an Excel workbook. I used the following to set this up:
Go to the Formulas tab.
Press the Define Name button.
Enter SheetNames into the name field.
Enter the following formula into the Refers to field.
=REPLACE(GET.WORKBOOK(1),1,FIND("]",GET.WORKBOOK(1)),"")
Hit the OK button.
Enter Index in A1 and SheetNames in B1
Starting in A2 enter 1,2,3,... for all sheets in workbook.
In B2 enter =INDEX(SheetNames,A2). Copy and paste this down the column.
This worked once. I saved the workbook as a macro-enabled workbook but now I just get #BLOCKED! as a result instead of the sheet name.
I did rearrange the sheets but even re-creating the above still gives me #BLOCKED!.
I'm working with Office365 on a PC with Windows 10.