SumIFs With AND not OR

countryfan_nt

Well-known Member
Joined
May 19, 2004
Messages
758
Hello friends, Hope all is well! I need your kind help please.

I have the below formula, and I want it to work like sumifs with AND statements; example:

I want the formula to show a result if the formula finds BOTH words (all or nothing): "vacation" AND "Career". If not, then zero.

{=IF(SUM((('Car Reservation'!$H$2:$H$2000=C14)*('Car Reservation'!$F$2:$F$2000<=F$12)*('Car Reservation'!$G$2:$G$2000>=F$12)*('Car Reservation'!$I$2:$I$2000={"vacation","Career"}))), ....


thank you in advance!

All the best!



Code:
=IF(SUM((('Car Reservation'!$H$2:$H$2000=C14)*('Car Reservation'!$F$2:$F$2000<=F$12)*('Car Reservation'!$G$2:$G$2000>=F$12)*('Car Reservation'!$I$2:$I$2000={"vacation"})))>=2,3,IF(SUM((('Car Reservation'!$H$2:$H$2000=C14)*('Car Reservation'!$F$2:$F$2000<=F$12)*('Car Reservation'!$G$2:$G$2000>=F$12)*('Car Reservation'!$I$2:$I$2000={"vacation","Career"})))>=2,4,IF(SUM((('Car Reservation'!$H$2:$H$2000=C14)*('Car Reservation'!$F$2:$F$2000<=F$12)*('Car Reservation'!$G$2:$G$2000>=F$12)*('Car Reservation'!$I$2:$I$2000={"vacation","Comitee","Career"})))>=3,7,IF(SUM((('Car Reservation'!$H$2:$H$2000=C14)*('Car Reservation'!$F$2:$F$2000<=F$12)*('Car Reservation'!$G$2:$G$2000>=F$12)*('Car Reservation'!$I$2:$I$2000={"comitee","Career"})))>=2,6,IF(SUM((('Car Reservation'!$H$2:$H$2000=C14)*('Car Reservation'!$F$2:$F$2000<=F$12)*('Car Reservation'!$G$2:$G$2000>=F$12)*('Car Reservation'!$I$2:$I$2000={"comitee","vacation"})))>=2,5,IF(SUM((('Car Reservation'!$H$2:$H$2000=C14)*('Car Reservation'!$F$2:$F$2000<=F$12)*('Car Reservation'!$G$2:$G$2000>=F$12)*('Car Reservation'!$I$2:$I$2000={"comitee","career","vacation"})))>=1,2,IF(SUM((('Car Reservation'!$H$2:$H$2000=C14)*('Car Reservation'!$F$2:$F$2000<=F$12)*('Car Reservation'!$G$2:$G$2000>=F$12)*('Car Reservation'!$I$2:$I$2000={"career"})))>=2,2,IF(SUM((('Car Reservation'!$H$2:$H$2000=C14)*('Car Reservation'!$F$2:$F$2000<=F$12)*('Car Reservation'!$G$2:$G$2000>=F$12)*('Car Reservation'!$I$2:$I$2000={"comitee"})))>=2,2,1))))))))
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
It will be something like this. Add your sheet names:

=COUNTIFS($H$2:$H$2000,C14,$F$2:$F$2000,"<="&F$12,$G$2:$G$2000,"<="&F$12,$I$2:$I$2000,"*vacation*",$I$2:$I$2000,"*career*")
 
Upvote 0
sorry for not being clear. if you see the original post you will see that there are several if statements. I wish to have an =if( added to the formula, and a result of the IF statement (please).
 
Upvote 0
=IF(COUNTIFS($H$2:$H$2000,C14,$F$2:$F$2000,"<="&F$12,$G$2:$G$2000,"<="&F$12,$I$2:$I$2000,"*vacation*",$I$2:$I$2000,"*career*"),TRUE,FALSE)
 
Upvote 0

Forum statistics

Threads
1,214,920
Messages
6,122,262
Members
449,075
Latest member
staticfluids

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top