+ Reply to Thread
Results 1 to 3 of 3

Two lookup values for a vlookup?

  1. #1
    Registered User
    Join Date
    11-11-2014
    Location
    Chicago
    MS-Off Ver
    2010
    Posts
    9

    Two lookup values for a vlookup?

    Hello,

    I need to pull data based on financial quarter AND year (ex: Q1 of 2010). Is it possible to incorporate both into the lookup value of a vlookup? Is there some other way to do this?

    Any help would be greatly appreciated.

    Thanks

  2. #2
    Forum Expert
    Join Date
    09-01-2012
    Location
    Norway
    MS-Off Ver
    Office 365
    Posts
    2,844

    Re: Two lookup values for a vlookup?

    http://exceltactics.com/vlookup-mult...g-index-match/

    http://www.excel-university.com/vloo...teria-columns/

    http://blogs.office.com/2012/04/26/u...okup-formulas/
    <----- If you were helped by my posts you can say "Thank you" by clicking the star symbol down to the left

    If the problem is solved, finish of the thread by clicking SOLVED under Thread Tools
    I don't wish to leave you with no answer, yet I sometimes miss posts. If you feel I forgot you, remind me with a PM or just bump the thread.

  3. #3
    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,933

    Re: Two lookup values for a vlookup?

    I can think of a few ways of doing this.

    1 relatively simple way would be to use a helper column to combine the 1 columns of info, then use that for the search. This column can be hidden if needed, and if you put to the left of your data, you could use VLOOKUP.
    A
    B
    C
    D
    1
    Option 1, helper on the left
    2
    A1 B1
    11
    3
    Helper Data1 Data2 Value
    4
    A1B1 A1 B1
    11
    5
    A2B2 A2 B2
    22
    6
    A3B3 A3 B3
    33
    7
    A4B4 A4 B4
    44
    8
    A5B5 A5 B5
    55
    9
    A6B6 A6 B6
    66

    C2=VLOOKUP(A2&B2,$A$4:$D$9,4,0)

    If you add the helper to the right, then INDEX/MATCH is the tool to use.

    A
    B
    C
    D
    11
    Option 2, Helper on the right
    12
    A1 B1
    11
    13
    Data1 Data2 Value Helper
    14
    A1 B1
    11
    A1B1
    15
    A2 B2
    22
    A2B2
    16
    A3 B3
    33
    A3B3
    17
    A4 B4
    44
    A4B4
    18
    A5 B5
    55
    A5B5
    19
    A6 B6
    66
    A6B6

    C12=INDEX($C$14:$C$19,MATCH(A12&B12,$D$14:$D$19,0))


    A
    B
    C
    21
    Option 3, No helper, using ARRAY
    22
    23
    A1 B1
    11
    24
    Data1 Data2 Value
    25
    A1 B1
    11
    26
    A2 B2
    22
    27
    A3 B3
    33
    28
    A4 B4
    44
    29
    A5 B5
    55
    30
    A6 B6
    66

    C23=INDEX($C$25:$C$30,MATCH(A23&B23,$A$25:$A$30&$B$25:$B$300))

    There are a few more complex formulas you could use, but hopefull, 1 of these will give you what you need

    Another, slightly more complex approach would be to use am ARRAY formula
    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

+ 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, 2 lookup values; then sum the lookup returned
    By pricepeeler in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 10-17-2014, 03:17 PM
  2. [SOLVED] Vlookup for two lookup values
    By vaibhav2312 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-12-2012, 01:08 AM
  3. VLOOKUP with two lookup values?
    By liur3n in forum Excel General
    Replies: 2
    Last Post: 11-09-2010, 02:27 PM
  4. Excel 2007 : Lookup/Vlookup using two Lookup values
    By Rick K in forum Excel General
    Replies: 4
    Last Post: 09-16-2010, 02:16 PM
  5. Two lookup values, vlookup
    By cbh35711 in forum Excel General
    Replies: 9
    Last Post: 04-05-2007, 04:55 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