+ Reply to Thread
Results 1 to 8 of 8

using VLOOKUP with 2 search columns

  1. #1
    Forum Contributor
    Join Date
    06-29-2016
    Location
    Bristol, England
    MS-Off Ver
    2007
    Posts
    355

    using VLOOKUP with 2 search columns

    Hi

    I am trying to pick out a value from a lookup table, using vlookup or similar. I have used vlookup before no problem.

    I am searching on a date, but the date has no year associated, just a column of days (02, 09, 18, etc) and a column of months (01, 02,....31).

    I could turn these into date numbers and search on that, but it would need a year number as well?

    I am not sure how to proceed

    Any ideas Please?

    K

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,207

    Re: using VLOOKUP with 2 search columns

    Please post a small sample file (not image) showing required results.

  3. #3
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,054

    Re: using VLOOKUP with 2 search columns

    Are there data from several years present? it would be helpful if you would attach a sample file (Go Advanced/Manage Attachments).
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  4. #4
    Forum Contributor
    Join Date
    06-29-2016
    Location
    Bristol, England
    MS-Off Ver
    2007
    Posts
    355

    Re: using VLOOKUP with 2 search columns

    The file concerned has a lot of personal data in it, so I will have to modify it 1st. No problem.

    I will return !!

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: using VLOOKUP with 2 search columns

    Perhaps something like this?
    A
    B
    C
    D
    E
    F
    1
    day Month data
    2
    1
    1
    10
    Day
    2
    3
    2
    1
    20
    Month
    2
    4
    3
    1
    30
    Data
    60
    5
    4
    1
    40
    6
    1
    2
    50
    7
    2
    2
    60
    8
    3
    2
    70
    9
    4
    2
    80
    10
    1
    3
    90
    11
    2
    3
    100
    12
    3
    3
    110
    13
    4
    3
    120

    F4=INDEX($C$2:$C$13,MATCH(F2&" "&F3,INDEX($A$2:$A$13&" "&$B$2:$B$13,0),0))
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  6. #6
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: using VLOOKUP with 2 search columns

    When using numbers with leading zeros, you're just asking for unnecessary complications.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  7. #7
    Forum Contributor
    Join Date
    06-29-2016
    Location
    Bristol, England
    MS-Off Ver
    2007
    Posts
    355

    Re: using VLOOKUP with 2 search columns

    Quote Originally Posted by FDibbins View Post
    Perhaps something like this?
    A
    B
    C
    D
    E
    F
    1
    day Month data
    2
    1
    1
    10
    Day
    2
    3
    2
    1
    20
    Month
    2
    4
    3
    1
    30
    Data
    60
    5
    4
    1
    40
    6
    1
    2
    50
    7
    2
    2
    60
    8
    3
    2
    70
    9
    4
    2
    80
    10
    1
    3
    90
    11
    2
    3
    100
    12
    3
    3
    110
    13
    4
    3
    120

    F4=INDEX($C$2:$C$13,MATCH(F2&" "&F3,INDEX($A$2:$A$13&" "&$B$2:$B$13,0),0))
    The table you created is spot on. This looks helpful, I will try it. many thanks

  8. #8
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: using VLOOKUP with 2 search columns

    Happy to help, thanks for the feedback

+ 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. [SOLVED] Vlookup search on columns LEFT of lookup reference
    By chesapeake_catskills in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-23-2015, 06:24 PM
  2. Replies: 4
    Last Post: 12-02-2014, 05:17 PM
  3. barcode search in vlookup with pop up message upon successful search
    By tangelag in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-13-2014, 12:25 PM
  4. Need a vlookup to search 2 columns in different worksheets
    By vickilynch in forum Hello..Introduce yourself
    Replies: 1
    Last Post: 11-26-2013, 11:15 AM
  5. vlookup type search from multiple columns
    By testbloke in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 08-23-2013, 08:29 AM
  6. [SOLVED] VLOOKUP to search multiple columns and return value from single column
    By BBExcelusr in forum Excel - New Users/Basics
    Replies: 9
    Last Post: 08-01-2012, 01:12 PM
  7. VLookup (possible to search two columns)?
    By stan123 in forum Excel General
    Replies: 2
    Last Post: 02-27-2007, 08:26 PM

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