Results 1 to 9 of 9
  1. #1
    New Lounger
    Join Date
    Oct 2004
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Lookup help (Excel XP 2002)

    When using the Lookup function, is it possible to return two values within the same cell?

  2. #2
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: Lookup help (Excel XP 2002)

    No the lookup functions only return the first found value.
    Check out <post#=395235>post 395235</post#> for some functions I wrote to do a lookup on "all" to see if this might help.

    Steve

  3. #3
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Salt Lake City, Utah, USA
    Posts
    9,508
    Thanks
    0
    Thanked 6 Times in 6 Posts

    Re: Lookup help (Excel XP 2002)

    Like this?

    =TEXT(VLOOKUP(B13,B9:F19,1,0),"@")&"/"&TEXT(VLOOKUP(B13,B9:F19,5,0),"@")
    -John ... I float in liquid gardens
    UTC -7ąDS

  4. #4
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Salt Lake City, Utah, USA
    Posts
    9,508
    Thanks
    0
    Thanked 6 Times in 6 Posts

    Re: Lookup help (Excel XP 2002)

    Steve, I think he or she is returning text values from the same record, so can concatenate multiple lookups. But we'll soon see.
    -John ... I float in liquid gardens
    UTC -7ąDS

  5. #5
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: Lookup help (Excel XP 2002)

    I think it is a matter of getting the "combined values" in Col B by lookingup the value in C in the cols E&F.

    Row 13 is "hard" since the value in C occurs twice in E
    Steve

  6. #6
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Salt Lake City, Utah, USA
    Posts
    9,508
    Thanks
    0
    Thanked 6 Times in 6 Posts

    Re: Lookup help (Excel XP 2002)

    I see what you mean.
    -John ... I float in liquid gardens
    UTC -7ąDS

  7. #7
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Ankeny, Iowa, USA
    Posts
    298
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Lookup help (Excel XP 2002)

    I don't know how reliable it is, but if there are only ever 2 instances of the same lookup number, and the list is sorted ascending, it appears that you can do two vlookups, one using True and one using False, to get your desired result. Maybe someone knows of a good reason this isn't a practical method to use????

  8. #8
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: Lookup help (Excel XP 2002)

    It is not reliable.

    1) you have a different formula for this one condition, it is not a general formula for all values (both 1 and 2 or 3 lookups). If you are gooing to manually change a formula it should be easy enough to just enter the combined text. I assume the problem is creating a formula that works for the entire column.

    2) Using a non-match for a list (even with ascending) assumes no duplicates. You will find the first 1 with the exact, but depending on the list, you might find the last one, the 2nd one or the third one next. And if the list is not sorted, you can get some very odd results.

    Steve

  9. #9
    New Lounger
    Join Date
    Oct 2004
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Lookup help (Excel XP 2002)

    I want to thank you guys for the help. The code worked perfect. Sorry for the late response.

    Patrick

Posting Permissions

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