• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 287
  • Last Modified:

Multi-column running summary formula

I need an Excel formula that allows me to calculate If Product = S AND Active = 1 THEN Total = Total + Cost, given this spreadsheet:

        A          B          C        D
1  Product  Active   Cost
2         S            1        12
3         B           0        14
4         S            1        13

The result should be Total = 15 (12 +13 from Rows 2 and 4)

I know I can do this if I create an additional Total column for the row and then sum it up. However, I'd rather not have to create additional columns on this spreadsheet to do so.

Thanks.
0
c0fee
Asked:
c0fee
  • 2
1 Solution
 
DamjanDemsarCommented:
you mean 25?

use sumifs

=SUMIFS(C2:C4;A2:A4;"=s";B2:B4;"=1")
0
 
c0feeAuthor Commented:
Oops, yes. 25. Long day. Thank you. I did have to replace the semicolon before the "= with a comma. This worked!
0
 
DamjanDemsarCommented:
yes,... semicolon, comma,.... it depends on the local settings, what the delimiter is (mine is a bit unusual as a semicolon.... comma is used as a decimal delimiter here)

I'm glad I could help
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now