Excel/Can #VALUE be used in a logical test?
Expert: Miguel Zapico - 10/21/2009
QuestionI have a set of 10 strings in 10 different cells. I want to test to see if a certain text string is in any of these 10 cells. My approach is to use the CONCATENATE fx to combine all the the cells and then use the FIND or SEARCH fx to check and see if the string I'm looking for is present in the combined string. I then want a cell to display a certain value if the text is there, and another value if it is not there. It works fine if the text value is present. I just use an IF statement to see if the SEARCH fx returns a value. The problem is that if the text I'm looking for is not there the SEARCH returns a #VALUE. Is there anyway to use the #VALUE return in a logical test, or is there another fx that will perform the task I need?
AnswerYou can use the ISERROR formula for this. For example:
=IF(ISERROR(Your_condition_here),"Error",Your_result)
The ISERROR formula returns TRUE if its parameters evaluates to an error, and FALSE otherwise. You can use it on your formulas as you see fit.
Hope this helps,
Miguel
About Excel
This topic answers questions related to Microsoft Excel spreadsheet (or workbook) stand-alone or Mircrosoft Office Excel including Excel 2003, Excel 2007, Office 2000, and Office XP. You can get Excel help on Excel formulas(or functions), Excell macros, charting in Excel, advanced features, and the general use of Excel. This does not provide a general Excel tutorial nor the basics of using a spreadsheet. It provides specific answers to using Microsoft Excel only. If you do not see your
Excel question answered in this area then please ask an Excel question here