Variables within a formula

AndrewKent

Well-known Member
Joined
Jul 26, 2006
Messages
889
So I have my second question to the forum for today, I'm hoping this might be an easy one. I have worksheets for each day and I want a main "Total" page to simply sum up the values from three cells. However a drop down list in A2 determines which days I want to SUM...

Code:
=SUM(Monday!B3,Monday!E3,Monday!H3)

...how do I make "Monday!" a variable that looks at Total!A2 for the day I wish to SUM?

Andy
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
Have a look at the INDIRECT function.

If A2 = "Monday", =INDIRECT(Total!A2&"!B3") will return the value in Monday!B3, etc.
 
Upvote 0
Perfect, that does exactly what I'm looking for. Is there another way of doing this? I achieved a similar result a while back but I can't remember how I done it (hence why I'm posting here!).
 
Upvote 0
Perfect, that does exactly what I'm looking for. Is there another way of doing this? I achieved a similar result a while back but I can't remember how I done it (hence why I'm posting here!).

Not that I can think of. I think INDIRECT is the way to go here.
 
Upvote 0

Forum statistics

Threads
1,214,636
Messages
6,120,669
Members
448,977
Latest member
moonlight6

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