+ Reply to Thread
Results 1 to 5 of 5

Date Formatting

  1. #1
    Forum Contributor
    Join Date
    11-19-2014
    Location
    United States
    MS-Off Ver
    2010
    Posts
    137

    Date Formatting

    I have a date of 4/20/2017 in a cell. Its cell format is Date --> 4/20/2017. When I change the cells format to Text or General the date will change to 42845. How can I keep a value 4/20/2017 when changing the format to Text or General?

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Date Formatting

    If you want to keep the date value to use in calculations you can't.

    If you don't need to use it in calculations you could use the TEXT function to convert it to a string.
    If posting code please use code tags, see here.

  3. #3
    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
    44,681

    Re: Date Formatting

    Excel is recognising the value as a number representing a date. If you edit the cell and put an apostrophe (single quote) as the first character it will be treated as Text.
    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


  4. #4
    Forum Contributor
    Join Date
    11-19-2014
    Location
    United States
    MS-Off Ver
    2010
    Posts
    137

    Re: Date Formatting

    Quote Originally Posted by TMS View Post
    Excel is recognising the value as a number representing a date. If you edit the cell and put an apostrophe (single quote) as the first character it will be treated as Text.
    This will work but is it possible to do this to multiple cells at once. Is there a function if I were to select all the cells and add an apostrophe to all of the selected cells?

  5. #5
    Forum Contributor
    Join Date
    01-05-2017
    Location
    New York
    MS-Off Ver
    Office 2016
    Posts
    206

    Re: Date Formatting

    If the date is in A2 put in B2: =TEXT(A2,"mm/dd/yyyy") and drag down. Then you can use any cell format and it will always stay the same.

+ 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. Formatting Cells with Date or Text Values in a Conditional Formatting Formula
    By Phil Hageman in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-15-2014, 09:36 AM
  2. Replies: 3
    Last Post: 11-23-2013, 06:21 AM
  3. Replies: 2
    Last Post: 09-19-2013, 10:34 AM
  4. Replies: 5
    Last Post: 08-22-2012, 05:06 PM
  5. Replies: 3
    Last Post: 07-11-2012, 10:03 AM
  6. Replies: 3
    Last Post: 08-18-2010, 12:58 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