Return cell value if workbook sheet name matches cell value

Aaronawl

New Member
Joined
Sep 11, 2018
Messages
10
Hi,

I have 2 workbooks. 1. Commission and 2. Overview.

1. Commission has 12 tabs, one for each month in the year. On each tab there is a list of commissions and a total figure. Column B contains the headings and column D contains the amounts.

2. Overview needs to be able to return the cell value of total figure based on cell reference: B8

For example:

If cell B8 of overview workbook = "August", I need the formula to search the Commissions workbook for sheet named 'August' and then return the value next to the total figure heading.

Changing the month in cell B8 to update the results for whatever month is entered.

Kind regards,
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
If the totals are always in the same cell on each sheet, you could use indirect:

Code:
=INDIRECT("[Book2]"&B8&"!$B$1")

Explanation:

  1. [Book2] is the name of the other workbook, Commissions
  2. B1 is that static place on each of the month tabs where the total is located
  3. B8 is the place on the Overview tab where you input the month you want returned.
 
Last edited:
Upvote 0
If the totals are always in the same cell on each sheet, you could use indirect:

Code:
=INDIRECT("[Book2]"&B8&"!$B$1")

Explanation:

  1. [Book2] is the name of the other workbook, Commissions
  2. B1 is that static place on each of the month tabs where the total is located
  3. B8 is the place on the Overview tab where you input the month you want returned.


Thank you for your reply. That seems to be what i'm looking for.

The B1 cell is static on each page. I currently have the formula returning a #REF ! :

Code:
=INDIRECT("[Commissions Spreadsheet - Adviser 1 - 2018.xlsx]"&B8&"!$D$41")

Is there someone else that needs changing?
 
Upvote 0
Thank you for your reply. That seems to be what i'm looking for.

The B1 cell is static on each page. I currently have the formula returning a #REF ! :

Code:
=INDIRECT("[Commissions Spreadsheet - Adviser 1 - 2018.xlsx]"&B8&"!$D$41")

Is there someone else that needs changing?

Ahhh your workbook has a longer name with spaces than your first indicated :-)
INDIRECT("'[Commissions Spreadsheet - Adviser 1 - 2018.xlsx]"&B8&"'!$D$41")

Needed to wrap with single quotations ' '
 
Upvote 0

Forum statistics

Threads
1,223,970
Messages
6,175,710
Members
452,667
Latest member
vanessavalentino83

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