+ Reply to Thread
Results 1 to 8 of 8

excel formula, two criteria, 3rd column result

  1. #1
    Registered User
    Join Date
    06-01-2015
    Location
    Lenexa, KS
    MS-Off Ver
    2010
    Posts
    3

    excel formula, two criteria, 3rd column result

    I have 3 columns. column A is my "lookup value", with multiples of the same value, column B is the date performed, column C is the data I need. Based on the look up value, Column A, I need the most recent date, column B (max) to give me data in column c. the date will change daily as new data comes in
    Thank you for your help

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

    Re: excel formula, two criteria, 3rd column result

    Try this...

    Data Range
    A
    B
    C
    D
    E
    F
    1
    A
    2/21/2011
    Data1
    A
    Data6
    2
    C
    8/29/2008
    Data2
    3
    A
    10/14/2005
    Data3
    4
    B
    2/28/2009
    Data4
    5
    D
    4/6/2009
    Data5
    6
    A
    4/12/2015
    Data6
    7
    C
    1/27/2008
    Data7
    8
    A
    12/20/2003
    Data8
    9
    D
    12/21/2000
    Data9
    10
    ------
    ------
    ------
    ------
    ------
    ------


    This array formula** entered in F1:

    =INDEX(C1:C9,MATCH(1,(A1:A9=E1)*(B1:B9=MAX(IF(A1:A9=E1,B1:B9))),0))

    ** array formulas need to be entered using the key
    combination of CTRL,SHIFT,ENTER (not just ENTER).
    Hold down both the CTRL key and the SHIFT key
    then hit ENTER.

    If the data is grouped by the lookup value and the dates are sorted in ascending order then it's a lot easier!
    Last edited by Tony Valko; 06-01-2015 at 10:12 PM.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Registered User
    Join Date
    05-25-2012
    Location
    Kendallville, Indiana, USA
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: excel formula, two criteria, 3rd column result

    This thread helped me immensely!

    I am doing something similar except the second lookup value is going to be in between certain values.
    I was able to modify the posted formula replacing the = with <= and sorting the table so the second column goes from greatest to least. Works perfectly.
    This method was much easier than some other methods I was reading about and trying to grasp.

    Again, thanks for the help!

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

    Re: excel formula, two criteria, 3rd column result

    A non-arrray (just use Enter), using INDEx-MATCH-INDEX and AGGREGATE, assumes ABCD criterion is in E1

    =INDEX($C$2:$C$10,MATCH(1,INDEX(($B$2:$B$10=AGGREGATE(14,4,$B$2:$B$10,1))*($A$2:$A$10=E1),0),0))
    Attached Files Attached Files
    Last edited by Glenn Kennedy; 06-08-2015 at 04:04 PM.
    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

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

    Re: excel formula, two criteria, 3rd column result

    You're welcome. Thanks for the feedback!

  6. #6
    Registered User
    Join Date
    06-01-2015
    Location
    Lenexa, KS
    MS-Off Ver
    2010
    Posts
    3

    Re: excel formula, two criteria, 3rd column result

    Thank you so much. I know just enough to be dangerous with formulas, the more I know the more dangerous I become.
    I appreciate the help on my journey

  7. #7
    Registered User
    Join Date
    06-01-2015
    Location
    Lenexa, KS
    MS-Off Ver
    2010
    Posts
    3

    Re: excel formula, two criteria, 3rd column result

    Thank you!!! I appreciate the visual. That's the way my brain works, (or doesn't, as the case maybe)

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

    Re: excel formula, two criteria, 3rd column result

    You're welcome. Thanks for the feedback!


    If your question has been solved please mark the thread as being solved.

    In the menu bar above the very first post select Thread Tools, then select Mark this thread as solved.

+ 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: 9
    Last Post: 02-04-2015, 09:26 AM
  2. need excel formula to get result from data table depends upon week,partner,column values
    By breadwinner in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-13-2013, 08:41 AM
  3. excel formula to find the result from the 3 column with criteria
    By breadwinner in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 09-26-2013, 05:09 AM
  4. Auto Hide/Unhide rows in Excel based on formula result in a column
    By crozierk in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 08-12-2012, 08:02 AM
  5. averaging a column based on criteria andputting result in new worksheet
    By BadLilBrat in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-20-2007, 03:01 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