Avatar of Matt Pinkston
Matt Pinkston
 asked on

Is this question possible in an excel formula

if e# = No
and if d# <> Yes-L
or f# = No
AND
h# or i# or j# = yes
then set column = yes
sampleexp.xlsx
Microsoft ExcelMicrosoft Office

Avatar of undefined
Last Comment
Matt Pinkston

8/22/2022 - Mon
Saqib Husain

=IF(OR(AND(E2 = "No", D2 <> "Yes-L"),AND(F2 = "No",OR(H2="yes", I2="yes", J2="yes"))),"yes","")
byundt

=IF(AND(E2="no",OR(D2<>"Yes-L",F2="No"),OR(H2:J2="Yes")),"Yes","")

Open in new window

Matt Pinkston

ASKER
seems like I am getting more than I should

I think your formula is doing

if e# = No
and if d# <> Yes-L
or f# = No

OR  instead of AND

h# or i# or j# = yes
then set column = yes
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
byundt

It would be helpful to have a sample workbook with test data and expected results. Here is mine: Complex IF formula.xlsx
Matt Pinkston

ASKER
sample attached
sampleexp.xlsx
Matt Pinkston

ASKER
byundt
wrong and or nesting and gets error
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
byundt

I reproduce the pink values with:
=IF(AND(OR(AND(E2="no",D2<>"Yes-L"),F2="No"),OR(H2:J2="Yes")),"Yes","")

Open in new window

byundt

Matt Pinkston

ASKER
the attached formula return #value!
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
Matt Pinkston

ASKER
if e# = No
and if d# <> Yes-L
or f# = No

AND only if at least one of the following h#,I#,j# is yes
Matt Pinkston

ASKER
if (e# = No and if d# <> Yes-L) or f# = No

AND only if at least one of the following h#,I#,j# is yes
byundt

Matt,
In Office 365, my suggested formula does not need array-entry. In older versions of Excel, it needs to be array-entered (Control + Shift + Enter. I posted a sample workbook so you could see the formula working.

Brad
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Matt Pinkston

ASKER
you lost me
byundt

  1. Select the cell
  2. Click in the formula bar
  3. Hold the Control and Shift keys down, then hit Enter and release all three keys
  4. Excel should respond by changing from #VALUE! error to a sensible answer. Excel will also surround the formula with curly braces { }.

If you still see #VALUE!, then repeat the procedure.
ASKER CERTIFIED SOLUTION
byundt

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Matt Pinkston

ASKER
Thanks
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck