View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Epinn Epinn is offline
external usenet poster
 
Posts: 605
Default Find value in array

Hi,

I don't know how many items you need to incorporate. Is it true that you must set up the table the way you mentioned?

If there is no rule, I will set up the table like this:-

Column 1 = the item
Column 2 = the category

pencil writing device
pen writing device
scrap paper paper
index card paper
paper clips fastener
tape fastener

etc. etc.

Then I use the VLOOKUP function (see Excel Help) to find an exact match. Pencil, pen, scrap paper etc. must be the leftmost column. Sort the above table in an ascending order to optimize speed.

This is just a thought and I use the KIS method. The experts may have other ideas. Please wait.

Epinn

"Brook6" wrote in message ...
I am trying to do something that seems simple, but not sure how to do it...
I want to have a table of text where the first column is a category and the
adjacent cells in each row are the values for that category that users might
want to find. The user types in a value, the function checks which category
it is in and returns that value.

Here is sample data; first value in row is category, other values are
possible user entries
writing device pencil pen marker sharpie
paper scrap paper notepad post it index card
fastener tacks staples paper clips tape

The way I want it to work, if a user types in 'pen', it returns the value
'writing device'

Any help appreciated. I have searched here and see some examples with INDEX
and MATCH, but none seem to be doing this.

Thanks!