+ Reply to Thread
Results 1 to 7 of 7

Lookup and return multiple Values

  1. #1
    Biff
    Guest

    Re: Lookup and return multiple Values

    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),INDEX(Sheet1!A$1:A$100,SMALL(IF(Sheet1!B$1:B$100=A$1,ROW($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" <[email protected]> wrote in message
    news:[email protected]...
    >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. #2
    Biff
    Guest

    Re: Lookup and return multiple Values

    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),INDEX(Sheet1!A$1:A$100,SMALL(IF(Sheet1!B$1:B$100=A$1,ROW($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" <[email protected]> wrote in message
    news:[email protected]...
    >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?




  3. #3
    Biff
    Guest

    Re: Lookup and return multiple Values

    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),INDEX(Sheet1!A$1:A$100,SMALL(IF(Sheet1!B$1:B$100=A$1,ROW($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" <[email protected]> wrote in message
    news:[email protected]...
    >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?




  4. #4
    Biff
    Guest

    Re: Lookup and return multiple Values

    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),INDEX(Sheet1!A$1:A$100,SMALL(IF(Sheet1!B$1:B$100=A$1,ROW($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" <[email protected]> wrote in message
    news:[email protected]...
    >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?




  5. #5
    Biff
    Guest

    Re: Lookup and return multiple Values

    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),INDEX(Sheet1!A$1:A$100,SMALL(IF(Sheet1!B$1:B$100=A$1,ROW($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" <[email protected]> wrote in message
    news:[email protected]...
    >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?




  6. #6
    Neil
    Guest

    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?

  7. #7
    Biff
    Guest

    Re: Lookup and return multiple Values

    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),INDEX(Sheet1!A$1:A$100,SMALL(IF(Sheet1!B$1:B$100=A$1,ROW($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" <[email protected]> wrote in message
    news:[email protected]...
    >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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1