Solved

Excel If/Or Statement

Posted on 2014-12-22
7
111 Views
Last Modified: 2014-12-22
Hello,

I have the following Excel formula:

=IF(OR(K46:K52)="Yes","Additional Items","")

I would like to alter it so that if any cell between K46:K52 is "Yes", the cell would return the value "Additional Items" - otherwise the cell would return blank.

Is this possible?

Thanks
0
Comment
Question by:dabug80
  • 3
  • 2
  • 2
7 Comments
 
LVL 11

Expert Comment

by:Wilder1626
Comment Utility
Hi

Is this what you are looking for:

=IF(K46:K51 = "Yes","","Additional Items")

Open in new window


In what cell do you put your formula?
0
 
LVL 11

Expert Comment

by:Wilder1626
Comment Utility
Another way could be:
=IF(OR(K46:K51 = "Yes"),"","Additional Items")

Open in new window

0
 
LVL 23

Accepted Solution

by:
Michael74 earned 500 total points
Comment Utility
=IFERROR(IF(MATCH("Yes", K46:K52, 0) > 0, "Additional Items"),"")

Open in new window

0
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
LVL 1

Author Comment

by:dabug80
Comment Utility
I've tried both solutions, and they each return the #value error. The formula works when the range is just K46 - but when I increase the range, I get the #value error.
0
 
LVL 23

Expert Comment

by:Michael74
Comment Utility
@dabug80

Try my formula. It looks for a match within the range and when it is found it displays "Additional Items". The IFERROR function handles the case when the Match fails and displays an empty string
0
 
LVL 23

Expert Comment

by:Michael74
Comment Utility
Could also simplify this a bit
=IFERROR(IF(MATCH("Yes", K46:K52, 0), "Additional Items"),"")

Open in new window

0
 
LVL 1

Author Closing Comment

by:dabug80
Comment Utility
Great. Thanks for your help Michael. Works perfectly.
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

INDEX and MATCH can be used to great effect to replace HLOOKUP and VLOOKUP as it does not have the limitation of needing the data to be sorted so that the reference value is in the first column or row. It also has the ability to perform a bi-directi…
How to quickly and accurately populate Word documents with Excel data, charts and images (including Automated Bookmark generation) David Miller (dlmille) Synopsis In this article you’ll learn how to use ExcelToWord! to copy data,charts, shapes …
The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…
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…

762 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

10 Experts available now in Live!

Get 1:1 Help Now