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

x
?
Solved

checking if a certain value is in an array: excel

Posted on 2011-09-05
3
Medium Priority
?
278 Views
Last Modified: 2012-05-12
Hi,

I am using excel 07 and want to write an IF statement to check if there is a certain value in a column of data.
My original formula was =if(A6:A15="FAUTY",FAIL,PASS) which i was hoping would say FAIL if there was a FAULTY in my column and PASS if there wasnt. Instead I only get a #VALUE! error??

Can you please help?
0
Comment
Question by:WTC_Services
[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
3 Comments
 
LVL 39

Accepted Solution

by:
nutsch earned 2000 total points
ID: 36486527
yes, because you're using an array in a formula that is not expecting one, in addition to using strings without double quoting them.

Try
=if(isnumber(match("FAULTY",A6:a15,0)),"FAIL","PASS")

Thomas
0
 
LVL 39

Expert Comment

by:nutsch
ID: 36486530
or
=if(countif(a6:A15,"FAULTY")>0,"FAIL","PASS")

T
0
 

Author Closing Comment

by:WTC_Services
ID: 36486564
Beautiful,

Thanks very much Thomas, I eventually used a combination of the two with:
=IF(COUNTIF(P13:P57,"FAULTY"),"FOR REVIEW","PASS")
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
This article describes how you can use Custom Document Properties to store settings and other information in your workbook so that they will be available the next time you open the 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…
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…

715 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