Refer to a Single cell in a name range

G

Guest

Is anyone there who can help me out?

What is the formula needed to refer a single cell in a named range of cells.
I mean, I want to compare a cells value with any of the cell values in the
named range. let the named range be "holidays"
 
V

vezerid

To identify a specific cell in a range, say the 5th cell in there you
use INDEX:

=INDEX(holidays, 5)

To see if a cell's value appears in holidays you use MATCH:

=MATCH(A2, holidays, 0)

This returns the position of A2 value in holidays. If the value of A2
is not found in holidays this returns the #N/A error. If you want to
test if the value appears in holidays you check if MATCH returns a
number:

=IF(ISNUMBER(MATCH(A2, holidays, 0))," In set", "Not in set")

HTH
Kostis Vezerides
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top