+ Reply to Thread
Results 1 to 8 of 8

Lookup & Index Match - Errors Returned

  1. #1
    Registered User
    Join Date
    09-11-2009
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    42

    Lookup & Index Match - Errors Returned

    Hi Guys,

    I am trying to set up a formula that checks a date is between 2 dates in a table and returns the corresponding column.

    A B C
    Start Date End Date Period
    28/02/2009 27/02/2010 2009/10

    The problem I am having is that if I search for 28/02/2009 it returns #N/A, this also occurs when I type 01/03/2009.

    The dates in my table a populated by formula if that makes any diferrence and I attached an example for ease of reference.

    Many Thanks
    Attached Files Attached Files

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

    Re: Lookup & Index Match - Errors Returned

    Your "date" in C2 is not really a date - it is a text expression. Use this instead:

    =DATE(YEAR(MIN(Data_Date)),MONTH(A2),DAY(A2))

    then the INDEX/MATCH in B12 will show the result.

    Hope this helps.

    Pete

  3. #3
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,156

    Re: Lookup & Index Match - Errors Returned

    hi shudder. expand the column of C. notice C2 is aligned to the left while the others are on the right? that's because C2 is recognized as a text. and Dates should be recognized as numbers. it's a text if you use CONCATENATE (&). i'm not sure what you're trying to do in C2. if it's oct-dec, the whole formula fails. maybe just:
    =DATE(YEAR(MIN(Data_Date)),MONTH(A2),DAY(A2))

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  4. #4
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,861

    Re: Lookup & Index Match - Errors Returned

    In C2 you have a text (it only looks as a date).
    Adjust the formula there to make sure it is a value not text:
    Please Login or Register  to view this content.
    and shall work fine

  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    47,997

    Re: Lookup & Index Match - Errors Returned

    C2 needs to be:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    because the formula you had produces a text value, not a date.

    B12:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    because you need to specify the last parameter in the MATCH (and you had a bracket in there)

    B14:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    because you LOOKUP against a single column, not two or more columns.


    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  6. #6
    Registered User
    Join Date
    09-11-2009
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    42

    Re: Lookup & Index Match - Errors Returned

    Thanks for everybody's input.

    I don't think I have ever seen as many responses that were near enough identicle!

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

    Re: Lookup & Index Match - Errors Returned

    Well, if your question has been answered, please select Thread Tools from the menu above your first post and mark this thread as SOLVED.

    Also, you might like to spread a bit of Christmas joy around to those who have helped you by clicking on the small "star" icon located in the lower left corner of a post that you have found to be helpful (not just in this thread - for any post that has helped you). This also adds to the reputation of the poster (the small green bars in the poster's profile).

    Pete

  8. #8
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    47,997

    Re: Lookup & Index Match - Errors Returned

    You're welcome. Thanks for the rep.

+ 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: 6
    Last Post: 04-30-2014, 02:42 AM
  2. Replies: 10
    Last Post: 08-19-2013, 11:33 AM
  3. Index/Match Function Errors
    By yakdevil in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-13-2013, 01:39 PM
  4. Duplicate values returned using Index Match Lookup with Small()
    By jacob@thepenpoint in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 03-18-2013, 10:48 AM
  5. Index Match Errors
    By Coldsteel in forum Excel General
    Replies: 7
    Last Post: 06-23-2010, 03:39 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