Solved

Excel Formula

Posted on 2015-01-22
5
86 Views
Last Modified: 2015-01-22
=IF(OR(A2="Yes",IF(B2="Open",B2="Book",IF(C2="Yes",IF(D2=0,D2=1)))),"Y","N")

so

   a          b             c         d
Yes      Open   YES         0

then the answer in e should be Y

a         b             c         d
Yes      Open   YES         7

Then the answer should be N

But they both return Y for me.

Your assistance is greatly appreciated.
0
Comment
Question by:Jagwarman
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 43

Expert Comment

by:Saqib Husain, Syed
ID: 40563986
Can you explain in english what you want to achieve.

Till then try

=IF(A2="Yes",IF(B2="Open",IF(OR(D2=0,D2=1),"Y","N")))
0
 
LVL 24

Expert Comment

by:Phillip Burton
ID: 40564005
Two things.

1. It's because you are using:
=IF(OR - in order words, only one of the conditions needs to be true.

Secondly, I would suggest reducing the number of IFs:

=IF(AND(A2="Yes",B2="Open",C2="Yes",OR(D2=0,D2=1)),"Y","N")
0
 

Author Comment

by:Jagwarman
ID: 40564434
Gents

I think there is a piece missing from your solutions, either that or I am going completely mad

the query is:

If A2 =Yes and B2 = Open or Book and C2 = Yes and D2 =0 or 1 then the answer is Yes otherwise No

Thanks for your help with this
0
 
LVL 24

Accepted Solution

by:
Phillip Burton earned 500 total points
ID: 40564441
=IF(AND(A2="Yes",or(B2="Open",B2="Book"),C2="Yes",OR(D2=0,D2=1)),"Y","N")
0
 

Author Comment

by:Jagwarman
ID: 40564445
How do you do that so quick Phillip. Brilliant thanks
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question