+ Reply to Thread
Results 1 to 3 of 3

Force Cell format as General when entering in a date.

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    01-19-2013
    Location
    Las Vegas, NV
    MS-Off Ver
    Office 365 2016
    Posts
    214

    Force Cell format as General when entering in a date.

    Lo again all,

    I have a little annoyance that I can't seem to solve. What I am trying to do is enter a date in a cell and have it not format as a date but as a general number. I have set the cell in question to "General" but when I type in a date the cell changes to a short-date number format.

    Ideas?

    Thanks gents

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

    Re: Force Cell format as General when entering in a date.

    Excel is trying to help you out I have not come across a method to defeat this automatic formatting.
    <---------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

  3. #3
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP, 2007, 2024
    Posts
    16,479

    Re: Force Cell format as General when entering in a date.

    I, too, see this kind of behavior and have not found a good solution to prevent Excel from auto-formatting cells formatted as "general".

    One could certainly code a "change event" that would undo the number format, but that seems like more work that it is worth.

    The real problem with your desired outcome is leaving the cells formatted as "general", since a number format of "general" is code for "if Excel has a better idea for number format, use it." What format would you like to see? If you are entering dates (no times), then format code of "0" (round to the nearest integer) should display any dates entered as integers. If time is also part of the entry, then simply include the desired number of decimal places you would like to see ("0.###" for example).
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

+ 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: 2
    Last Post: 06-02-2015, 08:42 AM
  2. Replies: 4
    Last Post: 09-19-2014, 11:26 AM
  3. [SOLVED] Require vba or formula for convert general format data in date format
    By santosh226001 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 09-10-2013, 03:53 AM
  4. Excel 2007 : Changing Cell Format from General -> Date
    By kfk5012 in forum Excel General
    Replies: 6
    Last Post: 09-29-2010, 04:28 PM
  5. Force cell date format
    By Macdave_19 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-20-2007, 04:07 PM
  6. Replies: 1
    Last Post: 01-26-2006, 10:10 PM
  7. Change general format to US date format
    By woodlot4 in forum Excel General
    Replies: 3
    Last Post: 10-10-2005, 08: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