Sum of select lines

seyss

New Member
Joined
Nov 1, 2013
Messages
14
Office Version
  1. 365
Platform
  1. Windows
Hello,

I'd like to calculate the sum of "Total Cost" of each "Area".
Example: "Total Cost" of "Area A" is 60.

PS: I have a 1000-lines long list so let's not use a simple addition formula.

Best regards,
Gabriel Klein

YkLKW2t.png
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
Assuming your data is in columns A through D, put this in cell E1 and copy down:

=IF(A1=A2,"",SUMIF(A:A,A1,D:D))

The sum of A will appear in the last row of A, the sum of B in the last row of B, etc.
 
Upvote 0
Thanks for the help!



Actually I made a mistake.. I won't have the column D available, so I'd have to multiply the values on column C with the values on column B.



Can it still be done with SUMIF?



Thank you.
 
Upvote 0
Put this formula in cell D1:

=IF(A1=A2,"",SUMPRODUCT(--(A:A=A1),B:B,C:C))

Copy down. It should give you the same output.
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,912
Members
452,366
Latest member
TePunaBloke

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