WoodPlane

Q: Spreadsheet conditional summation function?

I would like to sum certain columns, but only if the value in another column is equal to some number.

Is there a function like =SUM(B2..B12 IF(A2..A12=2))?

 

So if I have a table:

x     y

2     4

2     7

3     8

2     3

3     4

 

Sum x = 2: 4+7+3 = 14

Sum x = 3: 8+4 = 12

Posted on May 23, 2013 11:18 AM

Close

Q: Spreadsheet conditional summation function?

  • All replies
  • Helpful answers

  • by Barry,Solvedanswer

    Barry Barry May 23, 2013 7:36 PM in response to WoodPlane
    Level 7 (32,714 points)
    iWork
    May 23, 2013 7:36 PM in response to WoodPlane

    Hi WP,

     

    ApleWorks doesn't support SUMIF, so you'll have to break the process down into steps: Separate out the desired values into a new column, then sum the cells in that column.

    Picture 2.png

    X values in column A, Y values in column B.

    Desired X value in C1 (and in D1)

     

    C2: =IF(A2=C$1,B2,"")

    Select C2:C6

    Go Calculate > Fill Down.

     

    C7: =SUM(C2:C6)

     

    For column D, substutute D for C in both formulas. Otherwise they're the same.

     

    Regards,

    Barry

  • by WoodPlane,

    WoodPlane WoodPlane May 23, 2013 7:49 PM in response to Barry
    Level 2 (279 points)
    Mac OS X
    May 23, 2013 7:49 PM in response to Barry

    Thanks for the reply Barry.

    I do that in some places, but in others, it makes for a large spreadsheet since each test adds a column.