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.
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.
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.
Try:
Cheers,![]()
=SUMIF(A1:C1,"good",A2:C2)
Would you like to say thanks? Please click the: "Add Reputation" button, on the grey bar below the post.
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".
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
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.
non-contiguous ranges = bad for array formulas
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks