+ Reply to Thread
Results 1 to 3 of 3

Date validation out of 3 different cells

  1. #1
    Registered User
    Join Date
    12-18-2014
    Location
    nyc
    MS-Off Ver
    2013
    Posts
    30

    Date validation out of 3 different cells

    Hi- I was wondering if its possible to do the following:

    I am using 3 Cells: A1, B1 and C1. Each cell is a drop down list (data validation), so the user can choose and option. A1 being the Month, B1 being the Day and C1 being the year. Is it possible to validate the selections, and make sure the date that is entered is a valid date?

    For example, using the drop down list, a user has the ability to put in February 31, 2014 and submit the form... this date clearly does not exist.

    Is it possible to validate the date they enter in this situation?

    I tried stringing the cells together in cell D1, while simultaneously validating whether or not the date in D1 exists... this did not work... any ideas?

    Is the best way to potentially embed a macro in the submit button that first validates the date and then if True, the form is submitted. And if False, a message box advises the person submitting the form to edit the date?

    PS: I would prefer to use a formula/validation rather than VBA... this file already has enough VBA in it.

  2. #2
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Date validation out of 3 different cells

    Maybe look into the DATEVALUE Function. Here's an example on how you can validate the date.

    =IFERROR(DATEVALUE(A2&"/"&B2&"/"&C2),"Not a correct date format")
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    12-18-2014
    Location
    nyc
    MS-Off Ver
    2013
    Posts
    30

    Re: Date validation out of 3 different cells

    Thanks for the idea... went a different way, but used your formula

+ 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. Userform Validation if date is within 2 weeks of todays date
    By Mackattack in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-19-2014, 07:50 AM
  2. [SOLVED] Data Validation won't accept Start Date and End Date from cell values.
    By SpecialBrew in forum Excel General
    Replies: 12
    Last Post: 03-16-2014, 10:23 PM
  3. Adding Date Data Validation to cells with List Data Validation
    By biggtyme in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-03-2013, 09:47 AM
  4. Date and count validation in single cell - Custom Validation
    By murugavelmsc in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-16-2013, 05:25 AM
  5. Replies: 2
    Last Post: 12-31-2011, 02:44 AM

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