# 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

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","")
Matt Pinkston

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

h# or i# or j# = yes
then set column = yes
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

sample attached
sampleexp.xlsx
Matt Pinkston

byundt
wrong and or nesting and gets error
byundt

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

Matt Pinkston

the attached formula return #value!
Matt Pinkston

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

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.

Matt Pinkston

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.