• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

SumIF multiple conditions

Injinia

Member
Hi,


What would be the problem with the following formula, doesn't return any result.


=IF(C179="TRUE";SUMIF($E$178:$P$178;"x";E179:p179);"")


-Injinia
 
I don't think you can use semi colons to seperate arguments. Also, I'm pretty sure sumif is =sumif([criteria range],[criteria) with no room for a third argument.


I'm having a little trouble visualizing what you're trying to do here. Tell us more!
 
Dear Injinia,


Can you give more details. Becoz in this formula you have wrote; instead of , and which type of type you are working? formula wise =IF(C179="TRUE",SUMIF($E$178:$P$178,"x",E179:p179,""). all are ok, but if you didn't get any answer, then may be some errors. Please upload file. so that we can help you.


vijay
 
Formula structure appears to be okay. Are you sure the match isn't actually correct and the answer should be 0?
 
Hi ,


You are comparing C179 with the text string "TRUE" ; for this to work correctly , C179 should contain the text string TRUE which is obtained by entering the text TRUE prefixed by an apostrophe '.


Otherwise , format C179 as TEXT and then enter the text TRUE in it.


If C179 contains the logical values TRUE or FALSE , then the correct way to formulate the IF statement would be :

[pre]
Code:
=IF(C179;SUMIF($E$178:$P$178;"x";E179:P179);"")
[/pre]
Narayan
 
Good catch Narayan!

Playing around a little, looks like this is also acceptable (although, as you pointed out, redundant)

=IF(C179=TRUE;SUMIF($E$178:$P$178;"x";E179:p179);"")


More playing...all of these:

TRUE

=TRUE

=TRUE()


appear to evaluate to the same thing, as do these 2:

=(1>0)=TRUE

=(1>0)=TRUE()


Anyone know if there's an actual difference?
 
Hi Luke ,


I think Excel is very intelligent , or forgiving !


TRUE and =TRUE being equivalent appears logical ( pun intended ) , since we would expect 5 and =5 to be equivalent ; =TRUE() appears to be consistent with constructs such as =NA().


Narayan
 
Glad we could help, and thanks for the feedback. =)


@Narayan,

I think you're correct, XL (for once) is just trying to be forgiving.
 
Back
Top