+ Reply to Thread
Results 1 to 4 of 4

Date Function to limit cell to receive only a date

  1. #1
    Registered User
    Join Date
    09-21-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    41

    Date Function to limit cell to receive only a date

    Say for instance, the default date in cell A1 of the active worksheet is today's date. When asking the user for a new date, do anyone know how to check whether or not the value entered is a valid date. (preferrably user can enter any date format). <--- How do I put this in a loop, as long as the value entered is not in a proper date format or is not a date, then it will keep on looping and showing an error message.

    Thank you!!

    Kind Regards,
    dinosaur1993

  2. #2
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Date Function

    You can use data validation...

    Data Validation
    • Data >> Data Tools >> Data Validation
    • Allow: Whole Number
    • Data: greater than
    • Minimum: 0
    HTH
    Regards, Jeff

  3. #3
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,737

    Re: Date Function

    Here's an extract from a macro that I put together for another poster (in 2006 !!):

    Please Login or Register  to view this content.
    It seemed to work okay then ...

    Hope this helps.

    Pete

  4. #4
    Registered User
    Join Date
    09-21-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    41

    Re: Date Function to limit cell to receive only a date

    Thanks for the help guys!

+ 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: 1
    Last Post: 10-02-2012, 02:42 PM
  2. Replies: 12
    Last Post: 11-22-2011, 09:27 AM
  3. look for duplicate and receive warning msg + date filled automatically
    By fengfeng in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-04-2008, 06:55 PM
  4. Limit formula to 1st date value
    By DavidK in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-18-2007, 05:20 PM
  5. [SOLVED] limit cell value by date
    By Dmitrix in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 11-15-2005, 12:10 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