ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Detect Presence Formula (https://www.excelbanter.com/excel-worksheet-functions/109587-detect-presence-formula.html)

Ken

Detect Presence Formula
 
I need a formula that will detect the presence of a value in an unsorted
named array.

Column A would be the named array.
Column B would be the value I want to test for.
Column C would be the formula.

So, this is sort of what it would look like. "D" is the only value that
would return a True because it is the only value present in the named array.

D I False
B O False
W D True
T A False
J P False

Anyone know how to do this?

S Davis

Detect Presence Formula
 
Yes:)

Unfortunately, on my PC at home :(

If no one helps before then, I'll chime in.


Ken wrote:
I need a formula that will detect the presence of a value in an unsorted
named array.

Column A would be the named array.
Column B would be the value I want to test for.
Column C would be the formula.

So, this is sort of what it would look like. "D" is the only value that
would return a True because it is the only value present in the named array.

D I False
B O False
W D True
T A False
J P False

Anyone know how to do this?



Ron Coderre

Detect Presence Formula
 
Try something like this:

With your posted data in A1:B5

C1: =(COUNTIF($A$1:$A$5,B1)0)
copy that formula down through C5

or...if you want to search the entire column
=(COUNTIF(A:A,B1)0)


Does that help?
***********
Regards,
Ron

XL2002, WinXP


"Ken" wrote:

I need a formula that will detect the presence of a value in an unsorted
named array.

Column A would be the named array.
Column B would be the value I want to test for.
Column C would be the formula.

So, this is sort of what it would look like. "D" is the only value that
would return a True because it is the only value present in the named array.

D I False
B O False
W D True
T A False
J P False

Anyone know how to do this?


Gary''s Student

Detect Presence Formula
 
=IF(COUNTIF(A:A,B1)0,TRUE,FALSE)
--
Gary's Student


"Ken" wrote:

I need a formula that will detect the presence of a value in an unsorted
named array.

Column A would be the named array.
Column B would be the value I want to test for.
Column C would be the formula.

So, this is sort of what it would look like. "D" is the only value that
would return a True because it is the only value present in the named array.

D I False
B O False
W D True
T A False
J P False

Anyone know how to do this?


Ken

Detect Presence Formula
 
Hey! That seems to work. Thanks!

"Ron Coderre" wrote:

Try something like this:

With your posted data in A1:B5

C1: =(COUNTIF($A$1:$A$5,B1)0)
copy that formula down through C5

or...if you want to search the entire column
=(COUNTIF(A:A,B1)0)


Does that help?
***********
Regards,
Ron

XL2002, WinXP


"Ken" wrote:

I need a formula that will detect the presence of a value in an unsorted
named array.

Column A would be the named array.
Column B would be the value I want to test for.
Column C would be the formula.

So, this is sort of what it would look like. "D" is the only value that
would return a True because it is the only value present in the named array.

D I False
B O False
W D True
T A False
J P False

Anyone know how to do this?


Ron Coderre

Detect Presence Formula
 
Thanks for the feedback.....I'm glad that worked for you.

***********
Regards,
Ron

XL2002, WinXP


"Ken" wrote:

Hey! That seems to work. Thanks!

"Ron Coderre" wrote:

Try something like this:

With your posted data in A1:B5

C1: =(COUNTIF($A$1:$A$5,B1)0)
copy that formula down through C5

or...if you want to search the entire column
=(COUNTIF(A:A,B1)0)


Does that help?
***********
Regards,
Ron

XL2002, WinXP


"Ken" wrote:

I need a formula that will detect the presence of a value in an unsorted
named array.

Column A would be the named array.
Column B would be the value I want to test for.
Column C would be the formula.

So, this is sort of what it would look like. "D" is the only value that
would return a True because it is the only value present in the named array.

D I False
B O False
W D True
T A False
J P False

Anyone know how to do this?


Ken

Detect Presence Formula
 
Oh No! Thank you!

:)



"Ron Coderre" wrote:

Thanks for the feedback.....I'm glad that worked for you.

***********
Regards,
Ron

XL2002, WinXP


"Ken" wrote:

Hey! That seems to work. Thanks!

"Ron Coderre" wrote:

Try something like this:

With your posted data in A1:B5

C1: =(COUNTIF($A$1:$A$5,B1)0)
copy that formula down through C5

or...if you want to search the entire column
=(COUNTIF(A:A,B1)0)


Does that help?
***********
Regards,
Ron

XL2002, WinXP


"Ken" wrote:

I need a formula that will detect the presence of a value in an unsorted
named array.

Column A would be the named array.
Column B would be the value I want to test for.
Column C would be the formula.

So, this is sort of what it would look like. "D" is the only value that
would return a True because it is the only value present in the named array.

D I False
B O False
W D True
T A False
J P False

Anyone know how to do this?



All times are GMT +1. The time now is 10:28 PM.

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