Excel User Group
Microsoft Excel blogs, forums, files. Read, ask questions, provide answers.

Date format

Latest post Sat, Jun 28 2008 6:00 AM by Spindrift2004. 3 replies.
  • Fri, Jun 27 2008 11:03 AM

    Date format

    In MS Access it is possible to format a cell with __/__/____ so that it is only possible to enter a date. Is this possible in Excel. 

    • Post Points: 37
  • Fri, Jun 27 2008 11:23 AM In reply to

    Spindrift,

    You want Data Validation.  This allows you to limit what people type into a cell.  Unfortunately paste operations aren't limited (a topic of much discussion).

    David B.

    • Post Points: 5
  • Sat, Jun 28 2008 3:49 AM In reply to

    • Nick Hodge
    • Top 10 Contributor
    • Joined on Sun, Dec 23 2007
    • Southampton
    • Posts 242
    • Points 4,017
    • MVP

    Spindrift

    I'm sure David's answer is the way to go if you want to validate data. To complete the answer, Access has 'placeholders', Excel does not.

    You could also use a Worksheet_Change() event to validate the input into a cell and if you could validate as a date (4, 5 or six numbers not exceeding 28, 29, 30, 31 and 12 in the right places, etc) then format it as one?

    Neither solution is like the placeholder functionality in Access, but both offer solutions.

    Regards
    Nick Hodge
    Microsoft MVP, Excel
    Southampton, UK

    • Post Points: 21
  • Sat, Jun 28 2008 6:00 AM In reply to

    Many thanks for your info. I had completely forgotten about Data Validation and I have no idea what Worksheet_change is, but I shall now look it up.

    Peter

    • Post Points: 5
Page 1 of 1 (4 items) | RSS
Copyright Excel User Group and the relevant contributors, 2008. All Trade Marks acknowledged. This site is a peer-to-peer site and NOT affiliated in any way to Microsoft Corp. All rights reserved.