IF Function with multiple criteria

KuraiChikara

Board Regular
Joined
Nov 16, 2016
Messages
111
Office Version
  1. 2013
Platform
  1. Windows
Hello, I am trying to perform an IF function with multiple criteria. I'll explain what I'm trying to do first and then my formula is at the end.

There are 3 columns: Check Mark, Formula, Activity (in A, B & C)

In my example, imagine the "1" to be a check mark to do the activity in column C. If you have only one check mark or "1", that is only one activity to be done and FINE is populated from the formula. However, if another activity has a check mark or a "1" it means that activity is also being conducted at the same time as the first one. So the first selection errors out as a conflict because you can only do one thing at a time.

In the example below, a check mark is placed next to "Walk the Dog," since that's the only activity checked, FINE is populated. There is nothing in Column A next to the other activities so ZERO is populated where the formula is.

Check MarkFORMULAActivity
1FineWalk the Dog
0Bath Time
0Dishes
0Laundry
0Crafts

<tbody>
</tbody>


In this example, all activities have a check mark, all activities can't be done all at once so the first 4 activities CONFLICT and the last one is marked as FINE. This behavior is what I'm looking for, the last example is where I'm stumped.


Check MarkFORMULAActivity
1ConflictWalk the Dog
1ConflictBath Time
1ConflictDishes
1ConflictLaundry
1FineCrafts

<tbody>
</tbody>



Final example:
I put a "3" next to Bath Time, 3 has more significance to another project I have. Anyways, because of my formula it will calculate out to CONFLICT.
My formula reads like this:

=IF((A1+A2+A3+A4+A5)>1,"Conflict",IF(A1=1,"Fine",IF(A2=1,"FINE",IF(A3=1,"FINE",IF(A4=1,"FINE",IF(A5=1,"FINE",0))))))

Add Columns A1, A2, A3, A4 and A5 together, if greater than "1", put CONFLICT.
If not greater than "1" and A1, A2, A3, A4 or A5 just equals "1" put FINE.

What I want my formula to do, with columns A1, A2, A3, A4 and A5, is if it JUST equals 1 OR has a 1 AND specifically has a 3, to show FINE.
I don't know how to include the 3 like that.


I would like THIS:

Check MarkFORMULAActivity
1ConflictWalk the Dog
3ConflictBath Time
1ConflictDishes
1ConflictLaundry
1FineCrafts

<tbody>
</tbody>


To look like THIS:
Check MarkFORMULAActivity
1ConflictWalk the Dog
3FineBath Time
1ConflictDishes
1ConflictLaundry
1FineCrafts

<tbody>
</tbody>
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Sorry about the edit. I think more specifically I want my formula to look like THIS instead of what I originally stated.

Check MarkFORMULAActivity
0Walk the Dog
3FineBath Time
0Dishes
0Laundry
1FineCrafts

<tbody>
</tbody>
 
Upvote 0
Hi,

I believe this covers all your scenarios:


Book1
ABC
1Check MarkFORMULAActivity
20Walk the Dog
33FineBath Time
41ConflictDishes
51FineLaundry
60Crafts
Sheet148
Cell Formulas
RangeFormula
B2=IF(A2="",0,IF(A2=3,"Fine",IF(COUNTIF(A$2:A$6,1)-COUNTIF(A1:A$2,1)=1,"Fine","Conflict")))


B2 formula copied down.
 
Upvote 0

Forum statistics

Threads
1,220,965
Messages
6,157,119
Members
451,398
Latest member
rjsteward

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