View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Steve Jackson
 
Posts: n/a
Default Unable to search for a text value with IF

Hi,

I am trying to run an IF statement but not sure if it is appropriate because
it is involves text. What I have so far is along the lines of
=IF(A1:A10=Sheet2!B2,Run Numeric Statement,0).

What I am trying through the function to achieve is this:
1. Look in a column for the existance of a word. The Word is referenced to a
cell in another worksheet, so only cells are used in the function, which is
where the whole A1:A10=Sheet2!B2 test comes in.
2. If that word appears in the column then run a truth statement (All
numeric)
3. If that word doesn't appear then the value is 0

The problem I am getting with the IF function is that Excel responds with a
#Value error. Can the logical test in the IF statement search through a
block of text for the existance of another cell, even if that cell contains
text? Is there a more suitable function in Excel for searching for text?

Steve