+ Reply to Thread
Results 1 to 2 of 2

Adding an input mask to data validation

  1. #1
    Registered User
    Join Date
    10-28-2020
    Location
    High Wycombe, England
    MS-Off Ver
    Office 365
    Posts
    1

    Adding an input mask to data validation

    Hi all.

    Is it possible to use VBA to add an input mask to cell validation in excel.

    I want users to add dates without needing to put in a slash or dot in between the different date segments.

    Cheers

    Zigi

  2. #2
    Forum Expert XLent's Avatar
    Join Date
    10-13-2010
    Location
    Northumberland, UK
    MS-Off Ver
    various
    Posts
    2,704

    Re: Adding an input mask to data validation

    you could set the DV rule to allow certain types of integers - depending upon the format you wish to allow

    for ex. assume you want people to enter YYYYMMDD format, a Custom DV rule [A1]like below would enforce valid "date" entry:

    =ISNUMBER(TEXT(A1,"0000\-00\-00")+0)

    and you can use the exact same construct with dependent cells to convert the A1 value to it's Date Serial equivalent

+ 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. [SOLVED] Data Validation custom formula to use as input mask type of option
    By Hedy in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-16-2021, 03:55 PM
  2. [SOLVED] Formula for Excel Data Validation - Input Mask for Ten Digits
    By Hedy in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-07-2018, 10:20 AM
  3. Alphanumeric Data Validation, Input Mask?
    By bondingfortoday in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-20-2014, 10:34 PM
  4. Replies: 4
    Last Post: 02-01-2013, 10:18 AM
  5. Input Mask/Validation rule
    By SMAlvarez in forum Access Tables & Databases
    Replies: 0
    Last Post: 04-11-2011, 09:57 PM
  6. Excel 2007 : Input Mask for Cell Data
    By adzi in forum Excel General
    Replies: 1
    Last Post: 03-21-2009, 05:47 PM
  7. Set an Input Mask with Data Validation??
    By Rob in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-27-2005, 11:05 AM

Tags for this Thread

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