+ Reply to Thread
Results 1 to 5 of 5

VLookup Scenario

  1. #1
    Registered User
    Join Date
    02-10-2012
    Location
    Syracuse, NY
    MS-Off Ver
    Excel 2010
    Posts
    9

    VLookup Scenario

    This one has been boggling my brain for a while now. I'm trying to place a value into cell D1 based on the value found in A1.

    I have three columns:
    A
    Red
    Orange
    Blue
    Green
    Red
    Orange

    B
    4/12
    4/12
    4/12
    4/12
    4/13
    4/13

    C
    Robert
    Michael
    John
    Sara
    Tom
    Jim

    I am trying to create a formula in D1 that searches for the value in A1 with the MAX Date in B returning the value in C from the Max Date row. So in this case D1 would return"Tom".

    Is this possible using vLookup?
    Last edited by tbarnes22; 04-24-2013 at 08:41 PM.

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,728

    Re: VLookup Scenario

    Try this array* formula in D1:

    =INDEX(C1:C6,MATCH(A1&MAX(IF((A1:A6=A1),B1:B6,0)),A1:A6&B1:B6,0))

    *An array formula needs to be committed using the key combination of Ctrl-Shift-Enter (CSE) rather than the usual <Enter>.
    The attached file demonstrates.

    Hope this helps.

    Pete
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    02-10-2012
    Location
    Syracuse, NY
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: VLookup Scenario

    You are a genius! Thank you so much, this worked perfectly.

  4. #4
    Registered User
    Join Date
    02-10-2012
    Location
    Syracuse, NY
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: VLookup Scenario

    Quote Originally Posted by Pete_UK View Post
    Try this array* formula in D1:

    =INDEX(C1:C6,MATCH(A1&MAX(IF((A1:A6=A1),B1:B6,0)),A1:A6&B1:B6,0))

    *An array formula needs to be committed using the key combination of Ctrl-Shift-Enter (CSE) rather than the usual <Enter>.
    The attached file demonstrates.

    Hope this helps.

    Pete
    To add on to this, is there a way to only return the value in the D column if the row contains the max date? So in this case D1 would return nothing, and D5 would return "Tom".

  5. #5
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,728

    Re: VLookup Scenario

    Put this array* formula in D1:

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


    then copy down to D6.

    *Use CSE to commit, as previously advised.

    Hope this helps.

    Pete

+ 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