sum a column when the number of cells is variable

anon125

Active Member
Joined
Feb 14, 2008
Messages
392
i will have a column of numbers.
i wish to sum them BUT, how many i choose to sum depends on an entirely different cell,
so if that cell says 12, then i need to sum the first 12. if it says 60 then i sum the first 60.
i tried using sum with indirect and concatenate from an online formula - got nonsense!
i use an ancient version but it does have these indirect etc things.
Thanks for your kind help
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
How about
Book1
ABC
121
23
34
45
56
61
72
83
94
105
11
12
134
Sheet1
Cell Formulas
RangeFormula
C13C13=SUM(OFFSET($C$1,0,0,A1))
 
Upvote 0
Another possibility is
Excel Formula:
=Sum(C1: INDEX(C1:C5000,A1,1))
 
Upvote 0
@anon125 please do not ask members here to help you on another site.
 
Upvote 0
of the few who do not know... just click the green writing to go to that forum
thanks all
 
Upvote 0
There is no "green writing" as I removed the link.
Please see post#5
 
Upvote 0

Forum statistics

Threads
1,214,821
Messages
6,121,762
Members
449,048
Latest member
excelknuckles

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