View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
ryguy7272 ryguy7272 is offline
external usenet poster
 
Posts: 2,836
Default Extract multiple results based on multiple criteria

Sounds like a job for the alternative-vlookup (that's what I call it):
=IF(ROWS(B$1:B1)<=COUNTIF($A$1:$A$20,$E$1),INDEX($ B$1:$B$20,SMALL(IF($A$1:$A$20=$E$1,ROW($A$1:$A$20)-ROW($E$1)+1),ROWS(B$1:B1))),"")

Assume ColumnA is: a, b, c, a, b, c, etc...
Assume ColumnB is: 1, 2, 3, 4, 5, 6, etc...

put a 'c' in E1 and the function in F1; fill down.

Does that help?

Regards,
Ryan---
--
RyGuy


"tara657" wrote:

Hi,

I've got a spreadsheet with data exported for a project plan. In order to
create some Excel charts I need to extract dates based on multiple criteria.
Unfortunately, in some cases the criteria are not unique and I need all the
results. I'm unsing INDEX and MATCH to get my data but I can't figure out how
to convert into something where I can get the multiple results.

I'm getting data from sheet Task_Table1 where column D is the part number
and column E is the task. For some part numbers there are occasionally
repeated tasks
The following array formula gives me the date I need to extract for the
first match for each item in my list part numbers on worksheet Data
=INDEX(Task_Table1!$K$2:$K$500,MATCH(Data!$A4,IF(T ask_Table1!$E$2:$E$500=$B$1,Task_Table1!$D$2:$D$50 0),0))

Is there a way to modify this such that if my list of part numbers
(repeating the part number if two of the particular tasks are expected) can
have the required dates listed in another column? The formula can display an
error or NA if there's no result.

TIA