+ Reply to Thread
Results 1 to 14 of 14

Help with Vlookup Second and Third Value

  1. #1
    Registered User
    Join Date
    01-21-2018
    Location
    Northampton, England
    MS-Off Ver
    2010
    Posts
    61

    Help with Vlookup Second and Third Value

    I am trying to have a Vlookup that is able to pull the second and third values though from the second sheet.

    Could someone lend a hand please as i have tried several different methods on my main sheet but getting nowhere.

    Thanks in advance.
    Attached Files Attached Files

  2. #2
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    Office 365 ProPlus
    Posts
    5,883

    Re: Help with Vlookup Second and Third Value

    Try...
    In D3:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Copy across.

    Edit: Added 2nd condition for C3.
    ?Progress isn't made by early risers. It's made by lazy men trying to find easier ways to do something.?
    ― Robert A. Heinlein

  3. #3
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Help with Vlookup Second and Third Value

    Try this in D3:

    =INDEX(Sheet2!$D:$D,SMALL(IF(Sheet2!$C$2:$C$4=$C3,ROW(Sheet2!$B$2:$B$4)),COLUMNS($A:A))) Ctrl Shift Enter

    Drag the formula to the right.


    Edit: CK beat me to it! Win some lose some...

  4. #4
    Registered User
    Join Date
    01-21-2018
    Location
    Northampton, England
    MS-Off Ver
    2010
    Posts
    61

    Re: Help with Vlookup Second and Third Value

    Quote Originally Posted by 63falcondude View Post
    Try this in D3:

    =INDEX(Sheet2!$D:$D,SMALL(IF(Sheet2!$C$2:$C$4=$C3,ROW(Sheet2!$B$2:$B$4)),COLUMNS($A:A))) Ctrl Shift Enter

    Drag the formula to the right.


    Edit: CK beat me to it! Win some lose some...
    Would you be able to break down how this formula is created so that I would be able to integrate it into the main workbook?

    Regards.

  5. #5
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Help with Vlookup Second and Third Value

    Sure.

    Sheet2!$D:$D is the column where the values are that you want to return.

    Sheet2!$C$2:$C$4 is where you are looking for "1 Test Lane".

    ROW(Sheet2!$B$2:$B$4) just returns the row number of the match. I meant to change that from B to C but it doesn't make a difference.

    COLUMNS($A:A) returns 1, then when it is dragged one cell to the right, it turns into COLUMNS($A:B) which returns 2, then 3, etc.
    Last edited by 63falcondude; 01-08-2019 at 01:00 PM.

  6. #6
    Registered User
    Join Date
    01-21-2018
    Location
    Northampton, England
    MS-Off Ver
    2010
    Posts
    61

    Re: Help with Vlookup Second and Third Value

    Quote Originally Posted by 63falcondude View Post
    Try this in D3:

    =INDEX(Sheet2!$D:$D,SMALL(IF(Sheet2!$C$2:$C$4=$C3,ROW(Sheet2!$B$2:$B$4)),COLUMNS($A:A))) Ctrl Shift Enter

    Drag the formula to the right.


    Edit: CK beat me to it! Win some lose some...
    I have managed to update the example sheet to better depict the sheet I'm using but without any confidential information.

    I'm trying to get the formula to work in the red area but it just errors out. any help welcome.

    Regards.
    Attached Files Attached Files

  7. #7
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    Office 365 ProPlus
    Posts
    5,883

    Re: Help with Vlookup Second and Third Value

    I'd recommend restructuring your "Manifest Data" sheet. To flattened table structure. Or at least have same category column in one location. It will make subsequent lookup/analysis so much easier.

    Ex:
    0.JPG

  8. #8
    Registered User
    Join Date
    01-21-2018
    Location
    Northampton, England
    MS-Off Ver
    2010
    Posts
    61

    Re: Help with Vlookup Second and Third Value

    Unfortunately i am unable to change the Data source as this is how it comes though. so need to work with the data source i have already.

  9. #9
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Help with Vlookup Second and Third Value

    The 'Manifest Data' worksheet is set up poorly so the formulas used to pull from there will be more complex than should be necessary.

    You can try this in Shops!N6:

    Please Login or Register  to view this content.
    Ctrl Shift Enter

    Drag the formula to the right and down.

  10. #10
    Registered User
    Join Date
    01-21-2018
    Location
    Northampton, England
    MS-Off Ver
    2010
    Posts
    61

    Re: Help with Vlookup Second and Third Value

    Thats working, however if the Address shows in both the West and East it only pulls the Plot from West and wont show the East side plot number.

  11. #11
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,719

    Re: Help with Vlookup Second and Third Value

    Quote Originally Posted by Hyperion1571 View Post
    Unfortunately i am unable to change the Data source as this is how it comes though. so need to work with the data source i have already.
    Sorry, but this isn't the case at all. You can easily create another worksheet with a copy of the data in a layout suitable to this task. There's nothing stopping you from making it easier for yourself to crunch the data.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  12. #12
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Help with Vlookup Second and Third Value

    Quote Originally Posted by Hyperion1571 View Post
    Thats working, however if the Address shows in both the West and East it only pulls the Plot from West and wont show the East side plot number.
    I'm not sure what you mean. The formula from post #9 produces the exact results that you had in the workbook from post #6.

    The COUNTIF function tells the formula which column to look at.

  13. #13
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    Office 365 ProPlus
    Posts
    5,883

    Re: Help with Vlookup Second and Third Value

    @63falcondude
    I think OP means that when another record for "1 Test Lane" is added in East-DED1 section (F column).
    The formula does not look for match in F column. Since match is already found in C column.

    Personally can't think of smart way of dealing with this. It's probably far easier to create intermediate flat table to base lookup on.

  14. #14
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Help with Vlookup Second and Third Value

    Quote Originally Posted by CK76 View Post
    I think OP means that when another record for "1 Test Lane" is added in East-DED1 section (F column).
    The formula does not look for match in F column. Since match is already found in C column.
    Oh... The sample did not indicate this possibility.

    @63falcondude
    It's probably far easier to create intermediate flat table to base lookup on.
    I 100% agree with this.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 5
    Last Post: 12-07-2016, 09:18 AM
  2. Using vLookup based on results from a vLookup & returning an undetermined list
    By NormalityBan in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 08-14-2014, 05:02 AM
  3. Replies: 0
    Last Post: 12-26-2013, 01:12 PM
  4. Display Cell within VLookup range that excel thinks matches the VLookup Value
    By headachexcelperson in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-04-2013, 04:56 PM
  5. vlookup? match? index? MULTIPLE criteria for vlookup search problem....
    By aborg88 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 02-11-2013, 09:56 AM
  6. Replies: 5
    Last Post: 07-29-2009, 07:53 AM
  7. [SOLVED] vlookup function-Can vlookup command find the data from the 5 sheets.
    By Rishab shah in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 11:05 PM

Tags for this Thread

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