+ Reply to Thread
Results 1 to 12 of 12

Match & Index issue with dates

  1. #1
    Registered User
    Join Date
    02-09-2004
    Posts
    52

    Match & Index issue with dates

    Hi,

    hoping someone can help me, I've been slowly learning match & index from a few different sources, starting to come together but when I use dates as one of the lookups I'm having problems, generally returning #N/A. The first time I do it it works, then if I change the lookup criteria to another date it fails.

    I've attached a working example here, if you change any of the country names the formula works fine, if you type over the date criteria (G2) it returns #N/A but if you paste one of the lookup dates from column A into g2 it does work.

    Any ideas!? Is it a formatting issue/is it possible to do what I want?

    Any help is greatly appreciated I've been trying to figure it out for a while!

    Thanks.

    index_match_test.xlsx

  2. #2
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Match & Index issue with dates

    Hello

    Do you get your dates from another source? I ask this because format of the dates column is different than g2. If you change these your formula works great!
    Attached Files Attached Files
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  3. #3
    Registered User
    Join Date
    02-09-2004
    Posts
    52

    Re: Match & Index issue with dates

    Hi Fotis,

    I did, great spot thanks! I'll try and make sure the dates are the same from both.

    Thanks again for your help

  4. #4
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Match & Index issue with dates

    You are welcome and thanks for the feedback & rep.

    As that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED,as per Forum Rule #9. Thank you.

  5. #5
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Match & Index issue with dates

    Enter a 1 in a cell and copy it. Hold down the Ctrl key and select all the cells with dates then go to Paste Special, Multiply, Enter. This will change all the "dates" to real date values. Format the results in the date format of your choice.

    Tried it on your data and it works beautifully.
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  6. #6
    Registered User
    Join Date
    02-09-2004
    Posts
    52

    Re: Match & Index issue with dates

    Hi newdoverman, that's brilliant! So the 1 is the data type which is multiples by?

    Works really well thanks, unfortunately the original data is in a pivot from an external source so I can't change the type (unless I'm missing something here but can't see the option?), I'm having to build a new table in a new sheet which just says =text(c1(where pivot data is),"MM/DD/YYY") to force my new date in the new sheet to become text. It's the only way I can lookup.

    seems a bit convoluted though just because I can't change the data type in my pivot! Really good to know that forces the date out of it though.

  7. #7
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Match & Index issue with dates

    It is a real pain when the dates are in some "off the wall" format".

    I just tried this with a Pivot table that I have and it might work for you.

    Select the dates in the Pivot Table then on the Data tab, click on Text To Columns, Next, Next, Select Date and the date format, click Finish. This should leave the dates in the column of the Pivot Table and they should be changed to real dates.

  8. #8
    Registered User
    Join Date
    02-09-2004
    Posts
    52

    Re: Match & Index issue with dates

    Hmm I'm getting "can't move part of a PivotTable" when I try it, as if it is actually trying to split the text. I tried it both delimited and fixed width..

  9. #9
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Match & Index issue with dates

    There must be some kind of protection applied which isn't obvious.

  10. #10
    Registered User
    Join Date
    02-09-2004
    Posts
    52

    Re: Match & Index issue with dates

    OK, really appreciate the help though. I'll go with the long way for the time being! Will try and speak to the DB owners and see if the data format the data comes in on can be changed.

    thanks again.

  11. #11
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Match & Index issue with dates

    You're welcome. Too bad our efforts failed.

    Maybe you can get the original data and create your own Pivot Table...could be a lot less hassle.

    Good luck.

  12. #12
    Registered User
    Join Date
    02-09-2004
    Posts
    52

    Re: Match & Index issue with dates

    Hi, someone here just suggested a workaround solution of converting the date next to the pivot table, so just having =DATE(RIGHT(N84,4),MID(N84,4,2),LEFT(N84,2)) in a new column the the left of the pivot then I can use my index & match from that. Haven't tried yet but hopefully sounds like a better solution than the way I had it.

    As new data enters the pivot each day the pivot should just pick it up.

    Hopefully!

+ 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] Index/Match Issue
    By greggpetersen75 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-19-2013, 11:12 PM
  2. Index-Match Issue (I Think)
    By rormis in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-24-2012, 05:43 AM
  3. index match (issue)
    By step_one in forum Excel General
    Replies: 5
    Last Post: 05-16-2011, 02:58 PM
  4. index, match issue
    By step_one in forum Excel General
    Replies: 3
    Last Post: 05-03-2011, 03:40 PM
  5. Index/Match issue
    By ExcelNewby in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-05-2008, 02:28 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