View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
lesg46 lesg46 is offline
external usenet poster
 
Posts: 18
Default Lookup to return multiple values

Hi Max,
Once again you've come to my rescue.
Many thanks indeed.
Regards
Les

"Max" wrote:

Another play using simpler, faster, non-array formulas to achieve it

Source data as per original post assumed in Sheet1,
in cols A to C, data from row2 down
where key col = col C (Location)

In another sheet,
Input for location will be in B2, eg: Floor 1
Headers in A4:B4 : Equipment, Serial
In A5:
=IF(ROWS($1:1)COUNT($C:$C),"",
INDEX(Sheet1!A:A,SMALL($C:$C,ROWS($1:1))+1))
Copy A5 to B5

In C5:
=IF(LEN($B$2)=0,"",IF(TRIM(Sheet1!C2)=TRIM($B$2),R OWS($1:1),""))
Leave C1:C4 empty. Select A5:C5, copy down to cover the max expected extent
of source data, say down to C100. Minimize/hide col C. Results sought will be
returned in A5:B5 down, all neatly packed at the top, depending on the input
value in B2.
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:18,600 Files:362 Subscribers:60
xdemechanik
---