How can I use the value in one cell inside the formula in another cell?

wscott

New Member
Joined
Jan 15, 2013
Messages
2
Here's my example:

In cell A1 I have the formula =sum($b$1:$b$8)

I want to replace ONLY THE 8 above with a cell reference...for example in cell D1 I have the number 9. How can I get that number 9 inside my formula by just referencing D1?

Thanks!
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
THANKS! that did it. I knew I needed to use the Indirect function, but I couldn't get the syntax right. Thanks again!
 
Upvote 0
An alternative to using INDIRECT as it's a volatile formula:
=SUM(OFFSET($B$1,0,0,$D$1))
 
Upvote 0
Hi Rick

How is that? Would you mind to explain it?
Anything in quote marks is just text... it may look like cell references to you, but to Excel it is just characters grouped to together that have no meaning other than the individual characters themselves (it is the INDIRECT function's job to give meaning to those characters)... when you copy a cell with text in it, that text does not change, so the absolute referencing $ signs (to keep the cell references from changing when the formula is copied) are not needed because the text inside the quote mark will never change when the formula is copied.
 
Upvote 0
Hi I have a similar question but it's summing across multiple wooksheets in the same workbook:

=SUM('1:2000'!E17)

I want to change the 2000 value to link into a specific cell (A1) or (NewSheet!A1). The cell will contain the correct figure I want to display weather it be 2000 or 2001 or otherwise.
 
Upvote 0
Hi I have a similar question but it's summing across multiple wooksheets in the same workbook:

=SUM('1:2000'!E17)

I want to change the 2000 value to link into a specific cell (A1) or (NewSheet!A1). The cell will contain the correct figure I want to display weather it be 2000 or 2001 or otherwise.


Anyone have a guess?
 
Upvote 0

Forum statistics

Threads
1,225,627
Messages
6,186,099
Members
453,337
Latest member
fiaz ahmad

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