View Single Post
  #16   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Muliple lookup in one cell

If you don't get any responses, you may want to rephrase your question. I know
that I don't understand it.

TimD wrote:

I see I have not asked my question with all the details required.

The data example is on one sheet.

On another sheet I have 3 or more columns.
The header and first data element to search/ find in columns B, C, ... are
aaaa, bbbb
The row data and second data element for a2, a3, a4, ... are 1111, 2222,
2345, ...

I would like b2 to return the value from the first data sheet that has aaaa
and 1111, c2 return bbbb and 1111, etc.

"Dave Peterson" wrote:

Roger suggestion include the "copy down" note.

Then you would look at that column to pick out the item that returned true.

If you wanted to return the first value that matched your criteria, you could
use this array formula:

=INDEX(A2:A100,
MATCH(TRUE,ISNUMBER(FIND("aaaa",A2:A100)*FIND("222 2",A2:A100)),0))

or

this version based on toothless mama's response:
=INDEX(A2:A100,MATCH(TRUE,ISNUMBER(SEARCH("aaaa*22 22",A2:A100)),0))

This is an array formula. Hit ctrl-shift-enter instead of enter. If you do it
correctly, excel will wrap curly brackets {} around your formula. (don't type
them yourself.)

Adjust the range to match--but you can only use the whole column in xl2007.


TimD wrote:

This does not seem to return a cell, it returns a calculated value.

"Roger Govier" wrote:

Hi Tim

One way
=IF(ISNUMBER(FIND("aaaa",A2))*ISNUMBER(FIND("2222" ,A2)),TRUE,FALSE)
copy down

--
Regards
Roger Govier



"TimD" wrote in message
...
My data sample:

aaaa-*5#8-2222.zip
bbbb-0987-2345.dat
bbbb-*458-2222.xls

I want to return the cell that contains aaaa and 2222.






--

Dave Peterson


--

Dave Peterson