Sum cells in multiple rows if a certain condition in a different column on that row is met

Kamurra2

New Member
Joined
Jul 20, 2012
Messages
38
Hello. Sorry if that title is confusing, I'm not really sure how else to word it though. Here is a brief, simplified example of the spreadsheet I am working with.

[TABLE="width: 500"]
<TBODY>[TR]
[TD="align: center"]Customer[/TD]
[TD="align: center"]D / F[/TD]
[TD="align: center"]Current[/TD]
[TD="align: center"]30 Days[/TD]
[TD="align: center"]60 Days[/TD]
[/TR]
[TR]
[TD]ABC Co.[/TD]
[TD="align: center"]D[/TD]
[TD]40.00[/TD]
[TD]20.00[/TD]
[TD]0.00[/TD]
[/TR]
[TR]
[TD]XYZ Co.[/TD]
[TD="align: center"]F[/TD]
[TD]-34.00[/TD]
[TD]50.00[/TD]
[TD]5.00[/TD]
[/TR]
[TR]
[TD]123 Co.[/TD]
[TD="align: center"]D[/TD]
[TD]0.00[/TD]
[TD]70.00[/TD]
[TD]8.00[/TD]
[/TR]
[TR]
[TD]987 Inc.[/TD]
[TD="align: center"]F[/TD]
[TD]-90.00[/TD]
[TD]-50.00[/TD]
[TD]20.00[/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: center"][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]D Totals:[/TD]
[TD="align: center"]-[/TD]
[TD]40.00[/TD]
[TD]90.00[/TD]
[TD]8.00[/TD]
[/TR]
[TR]
[TD]F Totals:[/TD]
[TD="align: center"]-[/TD]
[TD]-124.00[/TD]
[TD]0.00[/TD]
[TD]25.00[/TD]
[/TR]
</TBODY>[/TABLE]


My spreadsheet has roughly 2,000 rows worth of customers. Is there an easy way to have the total cells for each date column (ex: "D Totals:" row, "Current" column, value is 40.00) sum all of the cells in that given row only if that criteria ("D/F" column in that row contains "D)?

I would like a formula that sums up all of the cells in a given column so long as a certain criteria (either "D" or "F") in a different column on that same row is met.

Thank you and let me know if I need to explain further / more clearly.
 
You can use SUMIF for that..

=SUMIF($B$2:$B$5,"D",C$2:C$5)

Awesome Jon thank you again! I have used sum if before but I did not realize you could have the range for the criteria and the sum range as different cells.

Thanks!
 
Upvote 0

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