Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

IF(OR  Statement in Excel

Posted on 2012-03-29
2
Medium Priority
?
404 Views
Last Modified: 2012-03-29
I am having a problem with the if(Or statement in Excel

I am trying to assign the value of "1" to a column B  if column Z is equal to "FE" or "GE" or "HE" or "IE"   and a value of "0" if it is not.

This statement is giving me a "0" at all times.   What is the correct code.

=IF(OR(Z29="FE",Z29="GE",Z29="HE",Z29="IE"),1,0)
0
Comment
Question by:morinia
[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 Comments
 
LVL 85

Accepted Solution

by:
Rory Archibald earned 1020 total points
ID: 37781958
That is correct, though you can simplify it to:

=IF(OR(Z29={"FE","GE","HE","IE"}),1,0)

are you sure you don't have any leading or trailing spaces in the cells you are checking, for example?
0
 

Author Comment

by:morinia
ID: 37782034
Thanks for the shorter version,  My formula did work, it just had not finished calculating.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
This article describes a serious pitfall that can happen when deleting shapes using VBA.
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…

705 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