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

Hi Steve,
Just for fun I figured out another way:-)
It doesn't use MATCH or ISERROR, however, it is an array formula and
must be entered using Ctrl + Shift + Enter.
If you require that the Sheet1!A1 value be in both Sheet2 and Sheet3
lists the array formula would be...

=IF(AND(OR(Sheet1!A1=Sheet2!A1:A10),OR(Sheet1!A1=S heet3!A1:A10)),SUM
Formula,0)

If the Sheet1!A1 value only needs to be in at least one of the Sheet2
and Sheet3 lists the array formula would be...


=IF(OR(OR(Sheet1!A1=Sheet2!A1:A10),OR(Sheet1!A1=Sh eet3!A1:A10)),SUM
Formula,0)

If you enter the formula correctly as an array formula it will appear
in the Formula Bar enclosed by {, and }.
I'm notorious for forgetting to enter array formulas the correct way,
especially after doing a bit of editing. When the formula then gives me
wrong results the first thing I do is check out the formula in the
Formula Bar. Most of the time the {}s are missing. To correct my error
I have to click in the Formula then go Ctrl + Shift + Enter to get the
{}s back in place. Typing in the {}s yourself does not have the desired
effect, Excel has to insert them via Ctrl + Shift + Enter.

Ken Johnson