+ Reply to Thread
Results 1 to 7 of 7

Sumproduct or sumif formula

Hybrid View

vasto Sumproduct or sumif formula 08-24-2009, 02:44 PM
NBVC Re: Sumproduct or sumif... 08-24-2009, 02:46 PM
ConneXionLost Re: Sumproduct or sumif... 08-24-2009, 02:47 PM
vasto Re: Sumproduct or sumif... 08-24-2009, 02:58 PM
daddylonglegs Re: Sumproduct or sumif... 08-24-2009, 03:04 PM
NBVC Re: Sumproduct or sumif... 08-24-2009, 03:03 PM
ConneXionLost Re: Sumproduct or sumif... 08-24-2009, 03:06 PM
  1. #1
    Registered User
    Join Date
    12-08-2008
    Location
    montreal
    Posts
    69

    Sumproduct or sumif formula

    a1=good
    a2 = 100

    b1 = bad
    b2 = 50

    c1 = good
    c2 = 100

    would like to sum a2+b2+c2 only if a1,b1,c1 = good.
    Last edited by vasto; 08-25-2009 at 09:59 AM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Sumproduct or sumif formula

    Try

    =IF(Countif(A1:C1,"Good")=3,Sum(A2:C2))
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Forum Expert ConneXionLost's Avatar
    Join Date
    03-11-2009
    Location
    Victoria, Canada
    MS-Off Ver
    2010
    Posts
    2,952

    Re: Sumproduct or sumif formula

    Try:

    
    =SUMIF(A1:C1,"good",A2:C2)
    Cheers,
    Would you like to say thanks? Please click the: " Add Reputation" button, on the grey bar below the post.

  4. #4
    Registered User
    Join Date
    12-08-2008
    Location
    montreal
    Posts
    69

    Re: Sumproduct or sumif formula

    sorry my fault

    scenairo is all in the same row

    a1=good b1=100 c1= bad d1=50 e1=good f1=100

    ab ** ef are linked .... would only like to add if the linked cells equal "good".

  5. #5
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,719

    Re: Sumproduct or sumif formula

    You could still use SUMIF, i.e.

    =SUMIF(A1:E1,"good",B1:F1)

    although that effectively gives you 5 pairs not 3 [which won't matter if A1, C1 and E1 are always text and B1, D1 and F1 are always numbers]

    If you explicitly want three pairs and that's the extent of the range

    =(A1="Good")*B1+(C1="Good")*D1+(E1="Good")*F1

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Sumproduct or sumif formula

    From your first post, it looks like you only want to add if all 3 are good... is that true? Or you want to add where corresponding value is "Good"?

    If the latter:

    =SUMIF(B1:F1,"good",A1:E1)

    if former:

    =IF(COUNTIF(B1:F1,"good")=3,SUM(A1:E1),"")
    Last edited by NBVC; 08-24-2009 at 03:06 PM.

  7. #7
    Forum Expert ConneXionLost's Avatar
    Join Date
    03-11-2009
    Location
    Victoria, Canada
    MS-Off Ver
    2010
    Posts
    2,952

    Re: Sumproduct or sumif formula

    non-contiguous ranges = bad for array formulas

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1