finding name within range

S

sheila

have had kind of help with this before but i need more.

i have a name that i wish to find if it is within range (range name =
"Names"). If that name (say George) is within that range, then I wish
that name to be entered into the cell with the formula. if "George"
isnt within that name, then I wish to search for "Harry" to see if
that is within the range and if so, then "Harry" to be entered into
the cell with the formula.

any help out there?

TIA
sheila
 
R

Roger Govier

Hi Sheila
Try
=IF(ISNUMBER(SEARCH("George",Names)),"George",IF(ISNUMBER(SEARCH("Harry",Names)),"Harry","
Not Found"))

Regards

Roger Govier
 
S

Sheila

no, that doesnt work, gives me "Not Found" when "George" is within the
range.

any other ideas?

TIA
 
D

Dave Peterson

=if(countif(names,"George")>0,"George",
if(countif(names,"Harry")>0,"Harry","not there"))

(all one cell)

may work.
 
Top