Trying to add numbers when grouped together.

jwillits

New Member
Joined
Jul 10, 2018
Messages
38
Office Version
  1. 2010
Platform
  1. Windows
I am trying to add the numbers in column 1 together into column 3 when the numbers in column 2 are the same, however, only when they are touching or directly beneath/above each other. If that same number comes again down the line, I would like it treated as a new number. It is possible that column 2 may have up to 7 of the same number in a row. Any ideas?

1001400
3001
2002200
50350
80180
702150
302
502
40740
1203120

I would like column 3 to be a formula to do this.
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Try:

Book2
ABC
1AmtCodeSum
21001400
33001 
42002200
550350
680180
7702150
8302 
9502 
1040740
111203120
12
Sheet2
Cell Formulas
RangeFormula
C2:C11C2=IF(B2=B1,"",SUM(A2:INDEX(A2:A10,MATCH(TRUE,B3:B10<>B2,0))))
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0

Forum statistics

Threads
1,224,815
Messages
6,181,136
Members
453,021
Latest member
Justyna P

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