If, and, or

Nanaia

Active Member
Joined
Jan 11, 2018
Messages
306
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
How do I successfully nest multiple AND and OR's along the same row? For example, I want to check if K3=V AND AP3 or AR3 or AT3 or AV3 or AX3 or AZ3 or BB3 or BD3 or BF3 or BH3="L" then TRUE, otherwise FALSE. I tried but failed spectacularly.
 
Last edited:

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
Maybe like
=IF(AND(K3="V",OR(AP3="L", AR3="L")),TRUE)

Could you have an "L" in AQ3, AS3 etc?
 
Upvote 0
I don't think you need the IF
=(AND(K3="V",OR(AP3="L", AR3="L"))
should be adequate
 
Upvote 0
Try:
=IF(AND(K3="V",OR(AP3="L",AR3="L",AT3="L",AV3="L",AX3="L",AZ3="L",BB3="L",BD3="L",BF3="L",BH3="L")),"TRUE","FALSE")
 
Upvote 0
If AQ3, AS3 etc cannot have "L" then you could use
=AND(K3="V",COUNTIF(AP3:BH3,"L"))
 
Upvote 0
Yes. I want it to check if "L" is in any of AP3 or AR3 or AT3 or AV3 or AX3 or AZ3 or BB3 or BD3 or BF3 or BH3. "L" could be in any of them, some of them, or all of them. And I'm second guessing whether I'm approaching this the right way, or at least if I'm wording it properly.

This is an issue I asked assistance with before in https://www.mrexcel.com/forum/excel...ny-10-columns-equals-any-4-other-columns.html . The formula used [ =SUMPRODUCT(COUNTIFS(CSV!U3:CSV!Y3,"<>0",CSV!U3:CSV!Y3,CHOOSE({1,2,3,4,5,6,7,8,9,10},CSV!AQ3,CSV!AS3,CSV!AU3,CSV!AW3,CSV!AY3,CSV!BA3,CSV!BC3,CSV!BE3,CSV!BG3,CSV!BI3)))>0 ] isn't providing the desired result. It's showing false for everything.

I'm wondering if trying to put all of this in one formula is what's causing my issues...or maybe it's an inability to convey what I'm trying to do...
 
Upvote 0
Have you tried any of the options supplied here?
Also you haven't answered my question from post#2
 
Upvote 0
Could you have an "L" in AQ3, AS3 etc?[/QUOTE]

I did answer. "Yes. I want it to check if "L" is in any of AP3 or AR3 or AT3 or AV3 or AX3 or AZ3 or BB3 or BD3 or BF3 or BH3. "L" could be in any of them, some of them, or all of them."

In regards to the other suggestions posted here, they weren't visible to me when I posted my response which showed up as #6 . When I submitted my post it would have been post #3 . I closed the window and continued my work so the additional posts weren't seen until now.
I will review and test the suggestions.
 
Upvote 0
I did not ask if you could have an "L" in AP3, AR3 etc, I asked if you could have an "L" in the other cells in that row, ie AQ3, AS3 etc.
 
Upvote 0

Forum statistics

Threads
1,223,885
Messages
6,175,182
Members
452,615
Latest member
bogeys2birdies

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