+ Reply to Thread
Results 1 to 17 of 17

Offset a vlookup

Hybrid View

Jymoz Offset a vlookup 02-27-2007, 05:29 AM
Carim Hi, Is it an offset... 02-27-2007, 05:42 AM
Jymoz I think it would be a vlookup... 02-27-2007, 06:25 AM
Carim Why don't you upload a zipped... 02-27-2007, 06:31 AM
daddylonglegs Here’s a generic solution. ... 02-27-2007, 09:28 AM
Teethless mama Try Auto Filter 03-03-2007, 06:02 PM
  1. #1
    Registered User
    Join Date
    11-30-2006
    Posts
    57

    Offset a vlookup

    is there any way to offset a vlookup formula so that it brings back values other than the first one.

    heres the problem:

    i have a table with customers and the rentals they have made. in the table it has their customer number and then the item code of the item they have rented out.

    i want to have a table that brings up the item codes of what they have rented but with a vlookup it only brings back the first item they have rented and not the ones after that.

  2. #2
    Forum Expert Carim's Avatar
    Join Date
    04-07-2006
    Posts
    4,070
    Hi,

    Is it an offset feature you are after (i.e. you do input the offset number) or a vlookup() function which would return several possibilities ...?
    HTH
    Carim


    Top Excel Links

  3. #3
    Registered User
    Join Date
    11-30-2006
    Posts
    57
    I think it would be a vlookup as each customer will have several rentals and i will need to pick up on all of them.

    It might work as an offset but i dont know how they work so i havent tried

  4. #4
    Forum Expert Carim's Avatar
    Join Date
    04-07-2006
    Posts
    4,070
    Why don't you upload a zipped copy of your worksheet ...?

  5. #5
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,720
    Here’s a generic solution.

    Supposing you want to lookup a value in C2 within A2:A10 and return all corresponding values in B2:B10 where there is a match.

    Use this formula in D2

    =IF(COUNTIF(A$2:A$10,C$2)>=ROWS(D$2:D2),INDEX(B$2:B$10,SMALL(IF(A$2:A$10=C$2,ROW(A$2:A$10)-ROW(A$2)+1),ROWS(D$2:D2))),"")

    confirmed with CTRL+SHIFT+ENTER

    copied down as far as you need. Note: it doesn’t matter if you paste the formula down 10 rows when there are only 2 matches, any unneeded cells will remain blank

    Note: to confirm with CTRL+SHIFT+ENTER, paste formula into D2, press F2, hold down CTRL and SHIFT keys and press ENTER at the same time. Curly braces like { and } should appear around the formula in the formula bar and the formula should give the correct result.
    Last edited by daddylonglegs; 02-27-2007 at 09:32 AM.

  6. #6
    Registered User
    Join Date
    11-30-2006
    Posts
    57
    with that formula edited to my spreadsheet i do get other values but not ones with that customer number

    can someone tell me what i need to do to attach the spreadsheet, i havent got anything that will change it to a zip file

  7. #7
    Banned User!
    Join Date
    10-14-2006
    Posts
    1,211
    Quote Originally Posted by Jymoz
    is there any way to offset a vlookup formula so that it brings back values other than the first one.

    heres the problem:

    i have a table with customers and the rentals they have made. in the table it has their customer number and then the item code of the item they have rented out.

    i want to have a table that brings up the item codes of what they have rented but with a vlookup it only brings back the first item they have rented and not the ones after that.
    Try Auto Filter

+ 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