Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,670
Default How to determine whether a list contains a specific value?

Does anyone have any suggestions on how to determine whether a list contains
a specific value? such as
{2, 6, 8, 16, 11, 9, 16} under column A
In cell B1, there is a value 3, if 3 is contained inside the list under
column A, then return 1, else 0.
Does anyone have any suggestions?
Thank in advance for any suggestions?
Eric
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,311
Default How to determine whether a list contains a specific value?

One way:

=IF(COUNTIF(A1:A10,4)0,1,0)

HTH,
Paul

"Eric" wrote in message
...
Does anyone have any suggestions on how to determine whether a list
contains
a specific value? such as
{2, 6, 8, 16, 11, 9, 16} under column A
In cell B1, there is a value 3, if 3 is contained inside the list under
column A, then return 1, else 0.
Does anyone have any suggestions?
Thank in advance for any suggestions?
Eric



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,339
Default How to determine whether a list contains a specific value?

If you mean is 3 (B1) in column A

=IF(countif(A:A,B1)0,1,0)


"Eric" wrote:

Does anyone have any suggestions on how to determine whether a list contains
a specific value? such as
{2, 6, 8, 16, 11, 9, 16} under column A
In cell B1, there is a value 3, if 3 is contained inside the list under
column A, then return 1, else 0.
Does anyone have any suggestions?
Thank in advance for any suggestions?
Eric

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,311
Default How to determine whether a list contains a specific value?

I forgot to mention...in my example I used the value 4 instead of 3. See
toppers formula which references the value in B1.
=IF(COUNTIF(A:A,B1)0,1,0)



"PCLIVE" wrote in message
...
One way:

=IF(COUNTIF(A1:A10,4)0,1,0)

HTH,
Paul

"Eric" wrote in message
...
Does anyone have any suggestions on how to determine whether a list
contains
a specific value? such as
{2, 6, 8, 16, 11, 9, 16} under column A
In cell B1, there is a value 3, if 3 is contained inside the list under
column A, then return 1, else 0.
Does anyone have any suggestions?
Thank in advance for any suggestions?
Eric





  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,670
Default Thank everyone very much for suggestions

Thank everyone very much for suggestions
Eric
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to determine the value from a list? Eric Excel Discussion (Misc queries) 6 May 22nd 07 07:51 PM
How to determine the values from a list? Eric Excel Discussion (Misc queries) 9 March 24th 07 02:59 PM
Determine which cells from a specific range equal a certain sum Maxter21 Excel Worksheet Functions 1 July 20th 05 10:44 PM
Determine shape name associated with a specific cell [email protected] Excel Discussion (Misc queries) 1 May 12th 05 01:49 AM
List ? - How do I make information in one cell determine list to u Brad_A Excel Worksheet Functions 1 January 18th 05 05:10 PM


All times are GMT +1. The time now is 07:49 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"