Sheet Function

mwollert

New Member
Joined
Jul 13, 2020
Messages
27
Office Version
  1. 365
Platform
  1. Windows
I am trying to get the index of each sheet in a workbook. For test purposes I have a work book with 5 worksheets named "test", "2019 Budget", "2020 Budget", "2021 Budget" and "2022 Budget".

On "test" sheet the names of the the 4 budget sheets are listed in A1:A4

I want to calculate the SHEET INDEX (order of sheet) of each SHEET NAME in A1:A4 in B1:B4. I am entering the following formula in B1:B4:


=SHEET(INDIRECT(A1 & "!A1"))

B1:B4 all show a #REF error.


Any suggestions on what I am doing wrong?
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Your sheet names contain spaces so you have to wrap them in single inverted commas.
Excel Formula:
=SHEET(INDIRECT("'"&A1 & "'!A1"))
 
Upvote 0
Solution

Forum statistics

Threads
1,216,730
Messages
6,132,397
Members
449,725
Latest member
Enero1

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top