+ Reply to Thread
Results 1 to 5 of 5

Help with VLOOKUPs on non-sorted data

  1. #1
    Registered User
    Join Date
    01-02-2012
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2010
    Posts
    13

    Help with VLOOKUPs on non-sorted data

    Hi there,

    I basically want to perform a VLOOKUP, but with it associating the values to different columns. So I want the ID column in Sheet 2 to match up with any of the values between W1 and W5, then give me the result of the tank number in Sheet 1. I think the problem is the numbers in W1 to W5 aren't necessarily in order, and excel can't handle it. I would change them, but it can't be arranged in any other way because each W value associates to a cup with a weighted sample.

    Anyway, I hope that made some sense, and I'd really appreciate the help ASAP.
    Attached Files Attached Files
    Last edited by lankks; 01-24-2012 at 05:17 AM.

  2. #2
    Valued Forum Contributor
    Join Date
    10-06-2008
    Location
    Norway
    MS-Off Ver
    2010
    Posts
    365

    Re: Help with VLOOKUPs on non-sorted data

    Hi, the IDs in sheet 1 and 2 are not the same: "SP" in front of the ID in one of the sheets. Remove "SP" in sheet one ore add it to the ID numbers in sheet 2.

  3. #3
    Forum Guru
    Join Date
    05-24-2011
    Location
    India
    MS-Off Ver
    Office 2021
    Posts
    2,237

    Re: Help with VLOOKUPs on non-sorted data

    Hi, try this

    Sheet2!F2, with CTRL+SHIFT+ENTER, rather than just ENTER

    =IFERROR(INDEX(Sheet1!$C:$C,SMALL(IF(Sheet1!F$2:J$13=A2,ROW(Sheet1!F$2:F$13)),1)),"")

    Copy down
    Regards,
    Haseeb Avarakkan

    __________________________________
    "Feedback is the breakfast of champions"

  4. #4
    Registered User
    Join Date
    01-02-2012
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2010
    Posts
    13

    Re: Help with VLOOKUPs on non-sorted data

    Quote Originally Posted by Haseeb A View Post
    Hi, try this

    Sheet2!F2, with CTRL+SHIFT+ENTER, rather than just ENTER

    =IFERROR(INDEX(Sheet1!$C:$C,SMALL(IF(Sheet1!F$2:J$13=A2,ROW(Sheet1!F$2:F$13)),1)),"")

    Copy down
    That didn't work, it just copied the first few entires in the tank column out verbatim and didn't associate the ID with the any of the W columns. Was I meant to copy paste the formula in as is?

    And I can't change the ID's in sheet 1, because they represent individuals, and the W number represent the cups I used to weigh a sample of them. So they're different things.

    EDIT: Actually, it did, I just misunderstood what you were saying. Could you explain this formula to me, because I need it to stretch over a much larger sheet and for a few more columns.
    Last edited by lankks; 01-24-2012 at 03:54 AM.

  5. #5
    Valued Forum Contributor
    Join Date
    10-06-2008
    Location
    Norway
    MS-Off Ver
    2010
    Posts
    365

    Re: Help with VLOOKUPs on non-sorted data

    Then try:
    =VLOOKUP("SP"&A2,Sheet1!$A$1:$J$13,3,FALSE)

+ 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