Finding a sum withing a column of numbers

dzeunen

New Member
Joined
Jul 25, 2017
Messages
6
I didn't know how to title this but this is what I am looking for.

If I have a list of numbers like below and I want to know when I reach 171, what formula would I use. I the perfect world it would let me know where the row is split. I just don't know any other way to explain it. Any help would be appreciated.
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12 Example being this is where I reach 171 but only 3 of this 12 of it is what I need.
12
12
12
12
12
240
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
Hi,

I think this answers part of your question, I don't understand what else you're asking:


Book1
AB
112 
212
312
412
512
612
712
812
912
1012
1112
1212
1312
1412
1512Reached 171
1612
1712
1812
1912
2012
21240
Sheet311
Cell Formulas
RangeFormula
B1=IF(AND(SUM(A$1:A1)>=171,SUM(A$1:A1)-A1<171),"Reached 171","")


Formula copied down.
 
Upvote 0
Perhaps this is what you want? The value in () is how much of the current row is used to reach the target.

Excel Workbook
ABC
1NumbersReached?Target
212 171
312
412
512
612
712
812
912
1012
1112
1212
1312
1412
1512
1612Reached 171 (3)
1712
1812
1912
2012
2112
22240
Reach Sum
 
Upvote 0
Ok, I understand the 2nd part of your question now (since Peter posted):


Book1
ABCD
112  171
212
312
412
512
612
712
812
912
1012
1112
1212
1312
1412
1512Reached 171 (used 3 on this row)Reached 171 (used 3 on this row)
1612
1712
1812
1912
2012
21240
Sheet311
Cell Formulas
RangeFormula
B1=IF(AND(SUM(A$1:A1)>=171,SUM(A$1:A1)-A1<171),"Reached 171 (used "&171-(SUM(A$1:A1)-A1)&" on this row)","")
C1=IF(AND(SUM(A$1:A1)>=D$1,SUM(A$1:A1)-A1),"Reached "&D$1&" (used "&D$1-(SUM(A$1:A1)-A1)&" on this row)","")


Use B1 formula where 171 is hard-coded in the formula.
Use C1 formula where 171 is a cell reference (D1), which you might change as needed.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,184
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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