Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Neil
 
Posts: n/a
Default Lookup and return multiple Values

I have a list of data in a sheet and I want to extract into a new sheet
values based on a condition . E.g. Column A has 100 rows of data. Column B
has a grouping e.g. Dept A, Dept B, Dept C etc . I want to extract into
another sheet any data from column A based on the value in column B (say Dept
B). Could you advise on the best way?
  #2   Report Post  
Biff
 
Posts: n/a
Default

Hi!

Here's one way...

Assume the data in sheet1 is in the range A1:B100

On sheet2 in cell A1 you have a drop down list of the departments: Dept A,
Dept B, Dept C etc..

Use this array formula entered using the key combo of CTRL,SHIFT,ENTER to
extract the corresponding data from sheet1 based on the selection made from
the drop down:

=IF(COUNTIF(Sheet1!B$1:B$100,A$1)=ROWS($1:1),INDE X(Sheet1!A$1:A$100,SMALL(IF(Sheet1!B$1:B$100=A$1,R OW($1:$100)),ROW(1:1))),"")

Copy down to enough cells to cover the maximum number of occurrences of any
single department. For example, if Dept B appears 20 times and that is the
most of any department then copy the formula to at least 20 cells.

Biff

"Neil" wrote in message
...
I have a list of data in a sheet and I want to extract into a new sheet
values based on a condition . E.g. Column A has 100 rows of data. Column B
has a grouping e.g. Dept A, Dept B, Dept C etc . I want to extract into
another sheet any data from column A based on the value in column B (say
Dept
B). Could you advise on the best way?



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Formula checking multiple worksheets sonic-the-mouse Excel Worksheet Functions 2 June 5th 05 08:48 PM
Return Multiple Results with Lookup Josh O. Excel Worksheet Functions 1 February 4th 05 09:07 PM
How do I lookup and return different values when the lookup value. kg Excel Discussion (Misc queries) 1 January 20th 05 01:53 AM
Lookup values in a list and return multiple rows of data Amanda L Excel Worksheet Functions 2 December 2nd 04 05:48 PM
How to look up and return multiple values Wendy Excel Worksheet Functions 3 November 3rd 04 05:32 PM


All times are GMT +1. The time now is 07:36 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"