Solved

Excel Formula

Posted on 2015-01-22
5
81 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
  • 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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

What is a Form List Box? (skip if you know this) The forms List Box is the alternative to the ActiveX list box. If you are using excel 2007, you first make sure you have a developer tab (click the Orb)->"Excel Options"->Popular->"Show Developer tab…
A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

757 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now