View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Jim J. Jim J. is offline
external usenet poster
 
Posts: 11
Default Find One Of Several Values Within A Cell

Maybe I misstated my needs. Lets try again:
I need to:
- Look into the contents of a cell, ex.: A12 (NOTE: Cell contents may be
100 characters)

- What I am looking for is any one of 5 values that I have listed in another
worksheet
- If I find any one of those values in A12 (will only be one of the 5
values), I want the function to report what value it found.
So, if my lookup values are €śBLK€ť, €śBLU€ť, €śGRN€ť, €śRED€ť, €śYEL€ť, and if the
contents of A12 is: 782517 0010 Plnd I18-9BLK-002 01/02 18 Awg, .070 Dia .009
5.4646
then I want the function to tell me it found €śBLK€ť

Thanks in advance!

"Gary''s Student" wrote:

You can avoid VBA if the colors are standalone:
=IF(OR(A1="RED",A1="BLK",A1="BLU",A1="BRN",A1="GRN ",A1="GRY",A1="WHT"),A1,"sorry charlie")

--
Gary''s Student


"Jim J." wrote:

Is there a method to perform the following function?:
I) Using a list of values (In my case, these are text. For the discussion,
lets assume they are colors in 3 place format, like BLK, BLU, BRN, GRN, GRY,
RED, WHT, etc.).
II) Look in a cell, and see if any of those values exist (NOTE: There will
never be more than one of these values within a cell).
III) If any one of these values is found within the cell, state which value
it is.

For example, the statement might look like this:
=IF(FIND({any of the values listed},E2,1),{whatever value it found in
E2},€ťSorry Charlie€ť) - where E2 is the €śWithin Text€ť location for the FIND
function.

I can accomplish this with nested IF functions, but this limits me to only
seven values.