How to SUM a cell range, using text from cells

etoforlife

New Member
Joined
Jul 20, 2014
Messages
1
I need to build a calculator that sums cells.
I want to be able to manually plug in the start cell and end cell into different cells then have the calculator return me a number.
[TABLE="width: 500"]
<tbody>[TR]
[TD]Start Cell[/TD]
[TD]D1[/TD]
[TD][/TD]
[TD]1[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]End Cell[/TD]
[TD]D3[/TD]
[TD][/TD]
[TD]2[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]3[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Calculated Value[/TD]
[TD]=sum(D1:D3)[/TD]
[TD][/TD]
[TD]4[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]5[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

Now if I change the text in B2 from "D3" to "D5", the calculated value should change as well.
Is there even a way to do this in excel?
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
http://office.microsoft.com/en-gb/excel-help/indirect-HP005209139.aspxINDIRECT - Excel
I need to build a calculator that sums cells.
I want to be able to manually plug in the start cell and end cell into different cells then have the calculator return me a number.
[TABLE="width: 500"]
<tbody>[TR]
[TD]Start Cell[/TD]
[TD]D1[/TD]
[TD][/TD]
[TD]1[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]End Cell[/TD]
[TD]D3[/TD]
[TD][/TD]
[TD]2[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]3[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Calculated Value[/TD]
[TD]=sum(D1:D3)[/TD]
[TD][/TD]
[TD]4[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]5[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

Now if I change the text in B2 from "D3" to "D5", the calculated value should change as well.
Is there even a way to do this in excel?

Try

=SUM(INDIRECT(B1):INDIRECT(B2))

where B1 and B2 are the cells which define the range.
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,327
Members
452,635
Latest member
laura12345

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