• 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.

Sumifs with or

[SOLVED]
Dear all,

Can anyone suggest on how best to solve this problem.

Situation: I need to use sumif(s) base on a validation list which contain "State"; "Private"; "State & Private". It is not a problem with only option "State" or "Private", but how do you make up for "State & Private" in which the condition can actually be just excluded.

Thanks in advance
 
Hi ,

Do you mean to say that when a cell in that column contains the data State & Private , it should be included whether you have selected State or Private as the criterion ?

Narayan
 
Hi ,

You can use SUMIF(S) with the criteria having the wildcard character :

=SUMIF(criteria_range,"*" & criterion_cell_address & "*",sum_range)

Thus , suppose your data is such that :

criteria_range : A2:A20
sum_range : B2:B20
criterion_cell_address : C1

Then , if C1 contains State , the SUMIF will also include State & Private ; the same applies if the criterion is Private.

Narayan
 
I am not sure if I understand. Are you saying that I have to create 2 cell for the result? I attach sample workbook.

Thank you
 

Attachments

  • example for chandoo.org.xlsx
    9.3 KB · Views: 4
Try this:
Code:
=SUMIFS(C2:C12,A2:A12,H1,B2:B12,IF(H2="State+Private","*",H2))
 
Back
Top