IF fuction for a RANGE of cells

  • Thread starter Thread starter davidbrowne17
  • Start date Start date
D

davidbrowne17

I am trying to write a IF formular that will return a value if a ther
is a match between an inputed value, and a range of possible values
all values are text, or names) . ie

=IF( A1=B1:H1,"YES","NO")

where B1:H1 contains a range of company names, and A1 is one of thes
names. I assume i could nest this with OR functions, but the list o
names maybe in excess of 30 possibles.

am i looking at this the wrong way, and should be using LOOKUP or MATC
functions?

Any help much appreciated!

David
 
davidbrowne17 said:
I am trying to write a IF formular that will return a value if a there
is a match between an inputed value, and a range of possible values (
all values are text, or names) . ie

=IF( A1=B1:H1,"YES","NO")

where B1:H1 contains a range of company names, and A1 is one of these
names. I assume i could nest this with OR functions, but the list of
names maybe in excess of 30 possibles.

am i looking at this the wrong way, and should be using LOOKUP or MATCH
functions?

Any help much appreciated!

David.

You could use either
=IF(OR(A1=B1:H1),"YES","NO")
array-entered (that is, Using CTRL+SHIFT+ENTER rather than just ENTER)
or
=IF(ISNUMBER(MATCH(A1,B1:H1,0)),"YES","NO")
(entered normally).
 
Back
Top