Using IF(AND(OR STATEMENT??

mcintoshmc

Active Member
Joined
Aug 10, 2007
Messages
277
W2:Z2 could say required, not required, or completed

If the cell says "required" it will eventually say "completed" once done. If it says "Not required", then it's not required.

I want cell AA2 to say "Completed" once all cells say "completed" or "Not required" or any combination thereof.

This is the formula that I created, but doesn't work. Any ideas?

=IF(OR(AND(W5="Completed",X5="Completed",Y5="Completed",Z5="Completed"),AND(W5="Not Required",X5="Not Required",Y5="Not Required",Z5="Not Required")),"Completed","Not Completed")
 

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.
Instead of test each one to see if they are completed or not required you can just test if any of them are required. If not then so Completed.
Code:
=IF(IFNA(MATCH("required",W2:Z2,0),0)=0,"Completed","Not Completed")
 
Upvote 0
=IF(COUNTIF(W5:Z5,"Completed")+COUNTIF(W5:Z5,"Not Required")=4,"Completed","Not Completed")
 
Upvote 0
Hi,

A couple of options for you:


Book1
WXYZAAAB
2CompletedRequiredNot requiredCompletedNot completedNot completed
Sheet165
Cell Formulas
RangeFormula
AA2=IF(SUM(COUNTIF(W2:Z2,{"Completed","Not required"}))=4,"Completed","Not completed")
AB2=IF(COUNTIF(W2:Z2,"Required"),"Not completed","Completed")
 
Upvote 0
Instead of test each one to see if they are completed or not required you can just test if any of them are required. If not then so Completed.
Code:
=IF(IFNA(MATCH("required",W2:Z2,0),0)=0,"Completed","Not Completed")

That worked perfectly. Thank you.

I then did this, but it returns false instead of staying blank.

=IF($O2<>"",IF(IFNA(MATCH("required",$W2:$Z2,0),0)=0,"Completed","Not Completed"))
 
Upvote 0

Forum statistics

Threads
1,215,351
Messages
6,124,445
Members
449,160
Latest member
nikijon

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