Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 42
Default Search for reference in an array

In Excel 2007, i need to search for a certain word within an array. For
example, I have array A1:A10. Each cell in this array contains a word. In
Cell B10 I have a word. If the word in B10 is the same as any of the words
in the array then I need then I need an IF statement to return true. If it
is not contained in the array, I need it to return false. As far as I know,
the Search function online applies to searching for a certain value within
one cell, not multiple cells.

Thanks for any help,
DoubleZ
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Search for reference in an array

One way:

=COUNTIF(A1:A10,B10)0

--
Biff
Microsoft Excel MVP


"DoubleZ" wrote in message
...
In Excel 2007, i need to search for a certain word within an array. For
example, I have array A1:A10. Each cell in this array contains a word.
In
Cell B10 I have a word. If the word in B10 is the same as any of the
words
in the array then I need then I need an IF statement to return true. If
it
is not contained in the array, I need it to return false. As far as I
know,
the Search function online applies to searching for a certain value within
one cell, not multiple cells.

Thanks for any help,
DoubleZ



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 42
Default Search for reference in an array

Fantastic. Thank you.

"T. Valko" wrote:

One way:

=COUNTIF(A1:A10,B10)0

--
Biff
Microsoft Excel MVP


"DoubleZ" wrote in message
...
In Excel 2007, i need to search for a certain word within an array. For
example, I have array A1:A10. Each cell in this array contains a word.
In
Cell B10 I have a word. If the word in B10 is the same as any of the
words
in the array then I need then I need an IF statement to return true. If
it
is not contained in the array, I need it to return false. As far as I
know,
the Search function online applies to searching for a certain value within
one cell, not multiple cells.

Thanks for any help,
DoubleZ




  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Search for reference in an array

You're welcome. Thanks for the feedback!

--
Biff
Microsoft Excel MVP


"DoubleZ" wrote in message
...
Fantastic. Thank you.

"T. Valko" wrote:

One way:

=COUNTIF(A1:A10,B10)0

--
Biff
Microsoft Excel MVP


"DoubleZ" wrote in message
...
In Excel 2007, i need to search for a certain word within an array.
For
example, I have array A1:A10. Each cell in this array contains a word.
In
Cell B10 I have a word. If the word in B10 is the same as any of the
words
in the array then I need then I need an IF statement to return true.
If
it
is not contained in the array, I need it to return false. As far as I
know,
the Search function online applies to searching for a certain value
within
one cell, not multiple cells.

Thanks for any help,
DoubleZ






  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,344
Default Search for reference in an array

Hi,

The following array formula works also:

=SUM(--(A1:A10=B10))0

However, the advantage of countif is it supports wildcards:

=COUNTIF(A1:A10,"*"&B10&"*")0

This would count the word Green anywhere in any of the cells in A1:A10
Red & Green
The Greening of America
....
--
Thanks,
Shane Devenshire


"DoubleZ" wrote:

In Excel 2007, i need to search for a certain word within an array. For
example, I have array A1:A10. Each cell in this array contains a word. In
Cell B10 I have a word. If the word in B10 is the same as any of the words
in the array then I need then I need an IF statement to return true. If it
is not contained in the array, I need it to return false. As far as I know,
the Search function online applies to searching for a certain value within
one cell, not multiple cells.

Thanks for any help,
DoubleZ

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
search macro with array G.R. New Users to Excel 3 April 18th 08 11:47 AM
Please help on array search & result ORLANDO V[_2_] Excel Worksheet Functions 3 January 29th 08 11:34 PM
search array jchick0909 Excel Worksheet Functions 3 October 5th 07 07:25 PM
Defining an array to search by Justlearnin Excel Discussion (Misc queries) 4 April 25th 07 04:59 PM
Text Search in an Array Jay Excel Discussion (Misc queries) 1 September 12th 06 11:23 PM


All times are GMT +1. The time now is 09:23 AM.

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

About Us

"It's about Microsoft Excel"