+ Reply to Thread
Results 1 to 7 of 7

Date problems

  1. #1
    Registered User
    Join Date
    10-16-2014
    Location
    montreal, canada
    MS-Off Ver
    2013
    Posts
    7

    Date problems

    I've reviewed several problems related to date formatting and couldn't get this working. Help appreciated. I'e attached a sample excel of the data I'm trying to manipulate. I want to be able to extract the MM,YYYY from column A in a new column extract the MM,YYYY from column B in a second new column. I cant use TEXT(A2,"YYYY-MM") or variations of this and I'm sure it's related to the format of the source fields (they're not dates). I assume I need an interim field to perform a conversion?C Any help/suggestions appreciated!
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Date problems

    =month(a2)&","&year(a2) ?

  3. #3
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,926

    Re: Date problems

    They seem to be coming across as dates in the download. If they are strings that look like dates in your originals, then wrap them in DATEVALUE() before trying to use TEXT() on them: =TEXT(DATEVALUE(A2),"mm-yyyy").

  4. #4
    Valued Forum Contributor
    Join Date
    04-01-2015
    Location
    The Netherlands
    MS-Off Ver
    2003/2007/2010/2016/office 365
    Posts
    880

    Re: Date problems

    =TEXT(DATE(MID(A2;7;4);LEFT(A2;2);MID(A2;4;2));"yyyy-mm")

  5. #5
    Registered User
    Join Date
    10-16-2014
    Location
    montreal, canada
    MS-Off Ver
    2013
    Posts
    7

    Re: Date problems

    I get a #VALUE! error in the cell when I use these expressions:

    =month(a2)&","&year(a2)
    =TEXT(DATEVALUE(A2),"mm-yyyy")

    and a formula error dialogue with the formula:

    =TEXT(DATE(MID(A2;7;4);LEFT(A2;2);MID(A2;4;2));"yyyy-mm")

    Thanks for the quick help but still stuck

  6. #6
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,926

    Re: Date problems

    Try =if(ISNUMBER(A2), TEXT(A2,"mm-yyyy"),TEXT(DATEVALUE(A2),"mm-yyyy")).

    The issue I have is I can't duplicate the problem from the attachment you sent.

  7. #7
    Registered User
    Join Date
    10-16-2014
    Location
    montreal, canada
    MS-Off Ver
    2013
    Posts
    7

    Re: Date problems

    Thanks for your help. =if(ISNUMBER(A2), TEXT(A2,"mm-yyyy"),TEXT(DATEVALUE(A2),"mm-yyyy")) resulted in #VALUE, but I did get =TEXT(DATE(MID(A6,7,4),LEFT(A6,2),MID(A6,4,2)),"yyyy-mm") to work. Thanks for the help!

+ 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. Convert Date and Time to Date - Format problems
    By eugbed in forum Excel General
    Replies: 5
    Last Post: 05-03-2015, 05:31 PM
  2. Replies: 0
    Last Post: 12-25-2011, 04:30 PM
  3. Date problems??
    By Robotacha2010 in forum Excel General
    Replies: 4
    Last Post: 12-23-2009, 03:21 PM
  4. Date Problems
    By mchesnu in forum Excel General
    Replies: 2
    Last Post: 03-28-2008, 12:05 PM
  5. [SOLVED] Date problems, is it a bug???
    By R-P in forum Excel General
    Replies: 4
    Last Post: 08-18-2006, 10:45 AM
  6. Date Problems
    By Dean in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-26-2005, 04:05 AM
  7. Date Problems
    By MikePiehl in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 06-02-2005, 01:05 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