+ Reply to Thread
Results 1 to 3 of 3

Data Validation: Date asked, ignores when whole number entered

  1. #1
    Registered User
    Join Date
    07-24-2012
    Location
    paris
    MS-Off Ver
    Excel 2010
    Posts
    1

    Data Validation: Date asked, ignores when whole number entered

    Hello,

    I have a problem with the Data Validation tool.
    I have a column where the user has to put a date in the dd/mm/aaaa format.
    I have set Validation data in this area to: Allow Date not equal to 1/1/1900, with the message and alert ticked.
    If I format the cells to General, Validation data lets a user enter a whole number without alerting, and it stays as a whole number in the cell.
    If I format the cells to Date jj/mm/aaaa, the whole number entered by the user is transformed to a (false) date and Validation Data doesn't alert him neither.

    What should I do?

    Thanks

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Data Validation: Date asked, ignores when whole number entered

    Show us what you mean with a sample workbook, not quite following that visually.
    _________________
    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
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Data Validation: Date asked, ignores when whole number entered

    With Excel, a date is simply a whole number formatted differently. Unfortunately, the data validation cannot see how you have formatted the cell. For example 7/24/2012 is the same as 41114. You could format those cells, unprotect them but protect the workbook. That would prevent anyone from changing the formatting.
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

+ 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.6.0 RC 1