Sum consecutive cells that meet criteria

Priya006

New Member
Joined
Aug 18, 2017
Messages
2
Sum consecutive cells that meet criteria
Please provide the excel formula for the below criteria
excel formula for sum of the Amount values when same price occurs consecutively till the next change of price


Actual

Price Amount
2 100
2 100
4 220
5 280
2 300
2 300

Expected

Price Amount result
2 100 200
2 100 200
4 220 220
5 280 280
2 300 600
2 300 600
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
The following formula gives me a count of runs:
=SUMIFS($C$10:$C$14,$G$10:$G$14,"="&G10)
confirmed with ctrl+shift+enter.

Amount = C10 to C14
Price= G10 to G14

But the above formula it will sum up amount values for all the price value which is equal to 2
 
Upvote 0
EF
1ChangeResult
21200
31200
42220
53280
64600
74600



<tbody>
</tbody>

Formeln der Tabelle
ZelleFormel
F2=SUMIF($E$2:$E$8,E2,$B$2:$B$8)
E3=IF(AND(IF(A1=A2,TRUE,A2=A3),IF(A2=A3,TRUE,A3=A4)),E2,E2+1)
E21

<tbody>
</tbody>

<tbody>
</tbody>


Excel Tabellen im Web darstellen >> Excel Jeanie HTML 4.8
 
Last edited:
Upvote 0
@ mart37

In your cell E2 ... why not =IF(ROW()=2,1,IF(A2=A1,E1,E1+1))
 
Upvote 0

Forum statistics

Threads
1,216,229
Messages
6,129,624
Members
449,521
Latest member
Anri

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