IF AND OR Confusion!

robbarba

Board Regular
Joined
Apr 17, 2016
Messages
79
Office Version
  1. 365
Platform
  1. Windows
Hi Team,

In advance thanks for your help.

I have a group of four cells Y, Z, AA, and AB that can contain one of 3 values "Completed", "Waiting" or "Not App"
If all four cells = "Completed" or all four cells = "Not App" then in Cell AE say "Validated"
If any of the four cell contain any other data i.e. "Waiting" then in Cell AE say "Pending"

This is what I have so far:

=IF(AND(Y2="Not App",Z2="Not App",AA2="Not App",AB2="Not App")*OR (Y2="Completed",Z2="Completed",AA2="Completed",AB2="Completed"),"Validated","Pending")

my data set: Y2="Completed",Z2="Completed",AA2="Completed",AB2="Completed"

in cell AE2 I get the result "Pending"

Assistance is appreciated!
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
Hello, try:

=IF(OR(AND(Y2="Not App",Z2="Not App",AA2="Not App",AB2="Not App"),AND(Y2="Completed",Z2="Completed",AA2="Completed",AB2="Completed")),"Validated","Pending")
 
Upvote 0
Thank you both, Never thought of using a COUNTIF in there, thanks again !!
 
Upvote 0
SPEEDBUMP Cell AA can also be singularly marked as "Completed" with no adverse effect is there a way to add this as another OR?
 
Upvote 0
SPEEDBUMP Cell AA can also be singularly marked as "Completed" with no adverse effect is there a way to add this as another OR?

What do you mean - AA is considered in the formula, do you mean if AA2 alone is marked "Completed" the formula should return "Validated"
 
Upvote 0
Not sure what you're asking. What results would you want in the following cases:

YZAAABACADAE
completedcompletedcompletedcompletedValidated
completedPending
not appnot appcompletednot appPending
waitingwaitingcompletednot appPending
waitingcompletedPending

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]2[/TD]

[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]3[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]4[/TD]

[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]5[/TD]

[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]6[/TD]

[TD="align: right"][/TD]

[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

</tbody>
Sheet1

[TABLE="width: 85%"]
<tbody>[TR]
[TD]Worksheet Formulas[TABLE="width: 100%"]
<thead>[TR="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]
[TH="width: 10px"]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
</thead><tbody>[TR]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]AE2[/TH]
[TD="align: left"]=IF(OR(COUNTIF(Y2:AB2,{"Completed","Not App"})=4),"Validated","Pending")[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]



Joyner: technically that is an array formula, but sometimes when you give it an explicit array constant (the {} ), you don't need to use Control+Shift+Enter.
 
Upvote 0
thanks for your assistance in advance,

Line 2 - Validated
Line 3 - Pending
Line 4 - Validated
Line 5 - Pending
Line 6 - Pending
All Blank - Pending
All Completed - Completed
All Not App - Completed
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,178
Members
453,021
Latest member
Justyna P

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