+ Reply to Thread
Results 1 to 3 of 3

Lookup Function help

  1. #1
    Registered User
    Join Date
    08-11-2005
    Posts
    24

    Lookup Function help

    I'm trying to use the Lookup function to return two values in a row. E.g.:

    worksheet1
    column A=lookup values (in this example, the lookup value is "3"--which is listed twice in the column)

    columns B & C=data to be returned

    worksheet 2
    when the lookup value "3" is found, cells A1 and B1 should contain the values from Sheet1 cells B1 and C1

    when the lookup value "3" is found, cells A2 and B2 should contain the values from Sheet1 cells B2 and C2

    The formula I have is =VLOOKUP(3,Sheet1!A1:C6,{2,3}). In sheet2, I selected cells A1 and B1 and array entered this formula in the formula bar.

    Result: Excel returns the correct values in A1 and B1, but doesn't find the other instances of the look up value. When I select a cell and drag the formula down, it only copies the values, it doesn't do a look up. Why is Excel only finding one instance of the lookup value? Thanks.

  2. #2
    Jim Rech
    Guest

    Re: Lookup Function help

    A VLOOKUP returns the first match in the referenced range. I'm not clear
    what you're expecting but a series of VLOOKUPs do not build on each other to
    return other matches. Each just returns the first match in its range.

    --
    Jim
    "marlea" <[email protected]> wrote in
    message news:[email protected]...
    |
    | I'm trying to use the Lookup function to return two values in a row.
    | E.g.:
    |
    | worksheet1
    | column A=lookup values (in this example, the lookup value is "3"--which
    | is listed twice in the column)
    |
    | columns B & C=data to be returned
    |
    | worksheet 2
    | when the lookup value "3" is found, cells A1 and B1 should contain the
    | values from Sheet1 cells B1 and C1
    |
    | when the lookup value "3" is found, cells A2 and B2 should contain the
    | values from Sheet1 cells B2 and C2
    |
    | The formula I have is =VLOOKUP(3,Sheet1!A1:C6,{2,3}). In sheet2, I
    | selected cells A1 and B1 and array entered this formula in the formula
    | bar.
    |
    | Result: Excel returns the correct values in A1 and B1, but doesn't find
    | the other instances of the look up value. When I select a cell and drag
    | the formula down, it only copies the values, it doesn't do a look up.
    | Why is Excel only finding one instance of the lookup value? Thanks.
    |
    |
    | --
    | marlea
    | ------------------------------------------------------------------------
    | marlea's Profile:
    http://www.excelforum.com/member.php...o&userid=26209
    | View this thread: http://www.excelforum.com/showthread...hreadid=398243
    |



  3. #3
    Alan Beban
    Guest

    Re: Lookup Function help

    marlea wrote:
    > I'm trying to use the Lookup function to return two values in a row.
    > E.g.:
    >
    > worksheet1
    > column A=lookup values (in this example, the lookup value is "3"--which
    > is listed twice in the column)
    >
    > columns B & C=data to be returned
    >
    > worksheet 2
    > when the lookup value "3" is found, cells A1 and B1 should contain the
    > values from Sheet1 cells B1 and C1
    >
    > when the lookup value "3" is found, cells A2 and B2 should contain the
    > values from Sheet1 cells B2 and C2
    >
    > The formula I have is =VLOOKUP(3,Sheet1!A1:C6,{2,3}). In sheet2, I
    > selected cells A1 and B1 and array entered this formula in the formula
    > bar.
    >
    > Result: Excel returns the correct values in A1 and B1, but doesn't find
    > the other instances of the look up value. When I select a cell and drag
    > the formula down, it only copies the values, it doesn't do a look up.
    > Why is Excel only finding one instance of the lookup value? Thanks.
    >
    >

    If the functions in the freely downloadable file at
    http://home.pacbell.net/beban are available to your workbook, you can
    array enter into a 2-column range that has sufficient rows to
    accommodate all the occurrences of the lookup value

    =Vlookups(3,Sheet1!A1:C6,{2,3})

    Alan Beban

+ 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