Solved

checking if a certain value is in an array: excel

Posted on 2011-09-05
3
252 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
  • 2
3 Comments
 
LVL 39

Accepted Solution

by:
nutsch earned 500 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

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 …
Workbook link problems after copying tabs to a new workbook? David Miller (dlmille) Intro Have you either copied sheets to a new workbook, and after having saved and opened that workbook, you find that there are links back to the original sou…
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…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

813 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