+ Reply to Thread
Results 1 to 5 of 5

change cell values of dates to the notation type of dates

  1. #1
    Forum Contributor
    Join Date
    02-27-2020
    Location
    Rotterdam, The Netherlands
    MS-Off Ver
    2013
    Posts
    425

    change cell values of dates to the notation type of dates

    Hi,

    I have created an adapted notation type of cel properties of yyyy-m (2019-01) for each date in a column. However, i see that the underlying value is still mm-dd-yyyy (01-12-2019). I would like the cell values to be equal to the notation type of the dates. Is this possible?

    Any input is welcome!
    Thank you in advance.
    Last edited by MaartenRo; 06-16-2020 at 07:22 AM.

  2. #2
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Re: change cell values of dates to the notation type of dates

    Cell formatting is only what XL shows. In the background, dates and times are numbers. If you want to change them to a certain format definitively try =TEXT(A1,"yyyy-m").
    Of course if you then need to do anything with those dates in formulas or anything, you are in trouble..

  3. #3
    Forum Contributor
    Join Date
    02-27-2020
    Location
    Rotterdam, The Netherlands
    MS-Off Ver
    2013
    Posts
    425

    Re: change cell values of dates to the notation type of dates

    Thank you for your input. I am trying to create a macro that places the dates of one column as a text in another column, so i can use this for a SumIf function as a condition.

    But my macro doesn't work:

    Please Login or Register  to view this content.
    Is there a way to do this?
    The problem is the line "Range("H" & i).Value .......

  4. #4
    Forum Contributor
    Join Date
    02-27-2020
    Location
    Rotterdam, The Netherlands
    MS-Off Ver
    2013
    Posts
    425

    Re: change cell values of dates to the notation type of dates

    Thank you for your input Arthurbr!
    The macro with the formula is to complicated and using your function works fine.

  5. #5
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: change cell values of dates to the notation type of dates

    How does placing a date which is merely a string of text help you when you want to use arithmetic to analyse the strings of text. You need the date number to do that.
    What do you mean by the formula is too complicated. What is the formula?
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

+ 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: 8
    Last Post: 07-20-2018, 11:52 AM
  2. Replies: 7
    Last Post: 08-30-2016, 12:48 PM
  3. Replies: 12
    Last Post: 06-13-2014, 05:03 PM
  4. Replies: 2
    Last Post: 11-26-2013, 11:04 AM
  5. Dates in 41150 type format and can not change them
    By Motox in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-31-2013, 06:59 PM
  6. Generating Dates from Notation: Better Way?
    By ra@SCM in forum Excel General
    Replies: 4
    Last Post: 06-27-2012, 07:48 PM
  7. Replies: 2
    Last Post: 01-20-2012, 08:19 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