How do a add a group of numbers in reverse until a condition is met?

Water Billing

New Member
Joined
Apr 2, 2019
Messages
1
I am trying to add a group of numbers together until I reach a 0 in a cell; however, I am starting with the last number in a column and going in reverse.

100
200
300
0
450
200
600

<tbody>
</tbody>

i.e. I would like to start with the last number (600) and add until I reach a zero (600+200+450). Can someone help me? Thank you.
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Welcome to Mr Excel forum

Try


A
B
C
1
Numbers​
Formula​
2
100​
1250​
3
200​
4
300​
5
0​
6
450​
7
200​
8
600​

Formula in C2
=SUM(INDEX(A2:A8,LOOKUP(2,1/(A2:A8=0),ROW(A2:A8)-ROW(A2)+1)):A8)

Hope this helps

M.
 
Upvote 0

Forum statistics

Threads
1,214,920
Messages
6,122,262
Members
449,075
Latest member
staticfluids

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