+ Reply to Thread
Results 1 to 5 of 5

VLOOKUP - Varying Positions and Values

  1. #1
    Registered User
    Join Date
    06-09-2011
    Location
    Boston, MA
    MS-Off Ver
    Excel 2011
    Posts
    12

    VLOOKUP - Varying Positions and Values

    I am looking to use VLookup to return a value that may be in a varying column position.

    In the attached example, if 3913 as the criteria lookup, I want it to travel across that row, find the 2, and return the value in the column or cell next to 2 (in this case the value returned would be 7.

    Note - both 3913 and 2 would be referenced in fixed cells that could be changed.

    The position of the 2 would change on each row.

    If the file didn't upload, please let me know.

    Thank you for the help.
    Attached Images Attached Images

  2. #2
    Forum Expert GeneralDisarray's Avatar
    Join Date
    09-15-2011
    Location
    Pittsburgh, PA, USA
    MS-Off Ver
    Windows Excel 2016
    Posts
    1,416

    Re: VLOOKUP - Varying Positions and Values

    See the attachment, this formula takes care of the example given. you will need to edit this to fit your ranges or upload a worksheet example with more details.

    Look in cell G4 for this:

    =INDEX($A$4:$D$7,MATCH($B$1,$A$4:$A$7,0),MATCH($C$1,INDEX($A$4:$D$7,MATCH($B$1,$A$4:$A$7,0),),0)+1)

    See the attached file.

    --EDIT--

    NOTE: I assume the first column is set. The "2" can move around and still be located with the 'middle' Match function, but the column with 3913 needs to remain unchanged for my solution.

    ALSO if you ever find the "2" is in the last column (so there is nothing to the right of it to return), this formula will error out..... again I can give more details and help with an actual example (workbook) not a picture
    Attached Files Attached Files
    Last edited by GeneralDisarray; 06-17-2013 at 04:30 PM.
    Remember, saying thanks only takes a second or two. Click the star icon(*) below the post you liked, to give some Rep if you think an answer deserves it.

    Please,mark your thread [SOLVED] if you received your answer.

  3. #3
    Registered User
    Join Date
    06-09-2011
    Location
    Boston, MA
    MS-Off Ver
    Excel 2011
    Posts
    12

    Re: VLOOKUP - Varying Positions and Values

    Thank you....that solved my issue, much appreciated.

  4. #4
    Registered User
    Join Date
    06-09-2011
    Location
    Boston, MA
    MS-Off Ver
    Excel 2011
    Posts
    12

    Re: VLOOKUP - Varying Positions and Values

    How do I mark a post a solved?

  5. #5
    Forum Expert GeneralDisarray's Avatar
    Join Date
    09-15-2011
    Location
    Pittsburgh, PA, USA
    MS-Off Ver
    Windows Excel 2016
    Posts
    1,416

    Re: VLOOKUP - Varying Positions and Values

    To mark your thread solved do the following:
    - Go to the first post
    - Click edit
    - Click Advance
    - Just below the word "Title:" you will see a dropdown with the word No prefix.
    - Change to Solve
    - Click Save

+ 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