+ Reply to Thread
Results 1 to 4 of 4

Thread: can Excel format dates like Access?

  1. #1
    Registered User
    Join Date
    10-19-2011
    Location
    East Lansing, Michigan
    MS-Off Ver
    Excel 2003
    Posts
    2

    can Excel format dates like Access?

    I am used to Access, where you set an input mask for dates, making it unnecessary to type in the slashes. So, if you type 10192011 in Access, you get 10/19/2011. If I try the former in Excel, I just get #######--and no, I made sure the column cells are formatted for dates and that the column is wide enough. I work in a big epidemiological research institution with multiple data bases and massive amounts of data entry, so it would save us data entry people a lot of time if we didn't have to type in the date slashes. Thanks, Janie Quick
    Last edited by Janie Quick; 10-27-2011 at 04:05 PM.

  2. #2
    Forum Guru JBeaucaire's Avatar
    Join Date
    03-21-2008
    Location
    Bakersfield, CA
    MS-Off Ver
    2010
    Posts
    19,212

    Re: can Excel format dates like Access?

    Excel displays dates as a "trick". The actual value IN the cell is a long number, currently in the 40800 range. But it goes up one number per day. So, 10192011 Excel will interpret as date beyond the year 9999, which is where the error is coming from.

    One built in non-VBA way to force them to enter the dates properly is through Data Validation. If the column B, then highlight B2:B100 and apply the Data Validation settings of:

    Allow: Custom
    Formula: =B2<50000

    You can play with that, but that should certainly work for most entries, especially if the cell is formatted for DATE and thus converting most entries into the closest logical date value.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    “None of us is as good as all of us” - Ray Kroc
    “Actually, I *am* a rocket scientist.” - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    10-19-2011
    Location
    East Lansing, Michigan
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: can Excel format dates like Access?

    Problem solved--many thanks! Janie

  4. #4
    Forum Guru JBeaucaire's Avatar
    Join Date
    03-21-2008
    Location
    Bakersfield, CA
    MS-Off Ver
    2010
    Posts
    19,212

    Re: can Excel format dates like Access?

    If that takes care of your need, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    “None of us is as good as all of us” - Ray Kroc
    “Actually, I *am* a rocket scientist.” - JB (little ones count!)

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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.2.0