ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Check if cell entry belongs to a name list-how? (https://www.excelbanter.com/excel-discussion-misc-queries/91773-check-if-cell-entry-belongs-name-list-how.html)

Bullman

Check if cell entry belongs to a name list-how?
 
Hello

I have only started to use and realise the power of using named lists
to represent a range of values. I am sure it is a simple thing to do,
but what is the easiest logical formula test that will look at a cell
and return a TRUE value if the entry in the cell belongs to a
pre-defined named list and a FALSE value if it does not.

Thanks in advance

Bullman


Dave Peterson

Check if cell entry belongs to a name list-how?
 
=isnumber(match(a1,sheet2!a:a,0))

My list is in Sheet2, column A (and nothing else is there).

And I'm checking the value in A1 of the activesheet.

Bullman wrote:

Hello

I have only started to use and realise the power of using named lists
to represent a range of values. I am sure it is a simple thing to do,
but what is the easiest logical formula test that will look at a cell
and return a TRUE value if the entry in the cell belongs to a
pre-defined named list and a FALSE value if it does not.

Thanks in advance

Bullman


--

Dave Peterson

Biff

Check if cell entry belongs to a name list-how?
 
Hi!

To check if it's part of a SPECIFIC named range/list:

Test cell A1 to see it its value is contained in a named range called List:

=ISNUMBER(MATCH(A1,List,0))

=COUNTIF(List,A1)0

Will return either TRUE or FALSE.

To check if it's part of ANY named range/list, I don't think that can be
done with a formula.

Biff

"Bullman" wrote in message
oups.com...
Hello

I have only started to use and realise the power of using named lists
to represent a range of values. I am sure it is a simple thing to do,
but what is the easiest logical formula test that will look at a cell
and return a TRUE value if the entry in the cell belongs to a
pre-defined named list and a FALSE value if it does not.

Thanks in advance

Bullman




Bullman

Check if cell entry belongs to a name list-how?
 
All great help guys, thanks!



All times are GMT +1. The time now is 02:24 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com