[mso] Re: Find a Value in an Excel Array

No, Ray, it's easier than that. You need this formula:

        =COUNTIF(A1:E3,6)

This will retun the number of 6s in the range. However, if you want to
force simply a TRUE or FALSE response, you can alter it like this:

        =COUNTIF(A1:E3,6)>0

Ray

------------------------------------
GR Business Process Solutions
Ray Blake
Head of Software Design
ray@xxxxxxxxx
Braedon
Newell Road
Hemel Hempstead
Herts HP3 9PD
tel: 01442 396518
fax: 01442 389353
mobile: 07834 226601
www.grbps.com
------------------------------------


-----Original Message-----
From: mso-bounce@xxxxxxxxxxxxx [mailto:mso-bounce@xxxxxxxxxxxxx] On
Behalf Of R Shapp
Sent: 25 June 2005 00:20
To: mso@xxxxxxxxxxxxx
Subject: [mso] Find a Value in an Excel Array


Hi Group,

How to tell whether a particular value is stored in an array in Excel
2002?

I have a 5-column, 3-row table containing just integers.  I want to
search it for the value "6", say.  If "6" is in the table at least once,
return TRUE else return FALSE.

The table is in A1:E3.

I have read Ray Blakes great article at http://www.grbps.com/Excel6.pdf
titled, Excel lookup functions explained Using VLOOKUP, HLOOKUP, INDEX
and MATCH in Excel to interrogate data tables. Maybe the answer is in
using MATCH within INDEX, but I haven't figured out how.

Thanks for the help.

Ray Shapp

*************************************************************
You are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx or 
MicrosoftOffice@xxxxxxxxxxxxxxxx

To send mail to the group, simply address it to mso@xxxxxxxxxxxxx

To Unsubscribe from this group, send an email to 
mso-request@xxxxxxxxxxxxx with the word "unsubscribe" (without the quotes) in 
the subject line.

Or, visit the group's homepage and use the dropdown menu.  This will also allow 
you to change your email settings to digest or vacation (no mail).
http://www.freelists.org/webpage/mso

To be able to use the files section for sharing files with the group, send a 
request to mso-moderators@xxxxxxxxxxxxx and you will be sent an invitation with 
instructions.  Once you are a member of the files group, you can go here to 
upload/download files:
http://www.smartgroups.com/vault/msofiles
*************************************************************

Other related posts: