+ Reply to Thread
Results 1 to 11 of 11

Using index and match to return a value based on earliest occurrence (MONTH)

  1. #1
    Registered User
    Join Date
    08-21-2014
    Location
    Bristol
    MS-Off Ver
    2010
    Posts
    15

    Using index and match to return a value based on earliest occurrence (MONTH)

    Hello all,

    I have an issue in Excel and I am at a loss with how to solve it...hopefully, someone can help

    I currently have a table that has values and dates in months.

    I need a formula to return the earliest month that a value occurred in (if multiple times).

    Name Highest (Month) Month
    Bill 16 Aug
    Matt 356 Jul
    Bob 356 Jun
    John 67 Sep

    Book1.xlsx

    I have this formula at the moment, which returns the month of the largest amount BUT it does the first month in the table, not the first month in the year that it occurred.

    =INDEX(Table3[Month],MATCH(MAX(Table3[Highest (Month)]),Table3[Highest (Month)],0))

    So, I get the result of Jul, whereas I need it to be Jun.

    I can't put the table in order because it changes dependent on other stuff, the only thing that doesn't change is the names.

    I hope that makes some sense and eagerly await some help.

    Thanks
    Last edited by potatoman; 09-06-2014 at 05:50 AM.

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

    Re: Using index and match to return a value based on earliest occurrence (MONTH)

    If you post a workbook with some sample data it will be much easier to help you.
    <----- 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
    Registered User
    Join Date
    08-21-2014
    Location
    Bristol
    MS-Off Ver
    2010
    Posts
    15

    Re: Using index and match to return a value based on earliest occurrence (MONTH)

    Hi,

    I've added a sample - hopefully it makes sense :S

    Thanks

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

    Re: Using index and match to return a value based on earliest occurrence (MONTH)

    This is an array formula, it has to be entered with Ctrl + Shift + Enter.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    08-21-2014
    Location
    Bristol
    MS-Off Ver
    2010
    Posts
    15

    Re: Using index and match to return a value based on earliest occurrence (MONTH)

    Thank you so much - that is absolutely perfect!!

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

    Re: Using index and match to return a value based on earliest occurrence (MONTH)


    ''''''''''''''''

  7. #7
    Registered User
    Join Date
    08-21-2014
    Location
    Bristol
    MS-Off Ver
    2010
    Posts
    15

    Re: Using index and match to return a value based on earliest occurrence (MONTH)

    I've just noticed that the solution in here works perfectly, however, I have a further query.

    Can you return the name in A12 based on the vales in B12 and C12?

    Earliest month match.xlsx

    Thanks

  8. #8
    Forum Expert
    Join Date
    03-28-2014
    Location
    Hyderabad,India
    MS-Off Ver
    Excel 2013
    Posts
    1,887

    Re: Using index and match to return a value based on earliest occurrence (MONTH)

    =INDEX(Sheet1!$A$4:$A$7,MATCH(B12&C12,Sheet1!$B$4:$B$7&Sheet1!$C$4:$C$7,0)) IN a12

    uSE cTRL+sHIFT+Enter at a time

    Punnam

  9. #9
    Registered User
    Join Date
    08-21-2014
    Location
    Bristol
    MS-Off Ver
    2010
    Posts
    15

    Re: Using index and match to return a value based on earliest occurrence (MONTH)

    That works amazingly and so simple *facepalm* thankyou!!

    I now have the issue with D23 not returning the correct date range.

    Earliest month match.xlsx

    Thanks

  10. #10
    Forum Expert
    Join Date
    03-28-2014
    Location
    Hyderabad,India
    MS-Off Ver
    Excel 2013
    Posts
    1,887

    Re: Using index and match to return a value based on earliest occurrence (MONTH)

    Hi,

    Their is no combination of data present in u r reference table matching 100 & 23/06/2014 - 29/06/2014 , check this using Filter .

    Punnam

  11. #11
    Registered User
    Join Date
    08-21-2014
    Location
    Bristol
    MS-Off Ver
    2010
    Posts
    15

    Re: Using index and match to return a value based on earliest occurrence (MONTH)

    Thanks - if I change it so that there is a value it seems to work OK.

    However, if there are two with the same value, I want it to return the earliest occurence based on the date.

    So D23 should be the earliest date.

    Earliest month match.xlsx

    Ignore this - I was being dense!!!

    Thanks
    Last edited by potatoman; 09-09-2014 at 06:17 AM.

+ 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. Using index and match to return a value based on earliest occurrence (MONTH)
    By potatoman in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-06-2014, 06:16 AM
  2. Index Match based on months away from current month
    By lpuerta75 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 08-15-2014, 04:24 PM
  3. [SOLVED] Index match multiple criteria based on earliest date
    By dchubbock in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 11-28-2013, 07:18 PM
  4. INDEX/MATCH & VLOOKUP based on month number
    By pixifaery in forum Excel General
    Replies: 2
    Last Post: 07-08-2010, 06:48 AM
  5. Return the earliest day of a month
    By vickyho1008 in forum Excel General
    Replies: 1
    Last Post: 07-07-2008, 04:49 AM

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