Solved

checking if a certain value is in an array: excel

Posted on 2011-09-05
3
245 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

867 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

26 Experts available now in Live!

Get 1:1 Help Now