+ Reply to Thread
Results 1 to 10 of 10

Multiple data validation

  1. #1
    Forum Contributor
    Join Date
    03-12-2022
    Location
    Atlanta, Georgia
    MS-Off Ver
    365
    Posts
    109

    Multiple data validation

    I am creating a worksheet and want to add validation rules to prevent users from inputting incorrect data. I experimented with Custom Data Validation but unsuccessful.

    These are the rules needed:

    Column "Date of Work":
    a. Entries must be only dates
    b. Entry date can not be after selected month (so anything after 7/31/23 should not be allowed)
    c. Entry can not be after Column "Date of Review" or Column "Date of Training"

    Column "Date of Review":
    a. Entries must be only dates
    b. Entry date has to be same month as selected month (July).
    c. Entry can not be before Column "Date of Work" or after Column "Date of Training"

    Thanks for your help!
    Attached Files Attached Files

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,968

    Re: Multiple data validation

    What is allowed for Date of Work when Date of Review or Date of Training is blank (or both)?

    What is allowed for Date of Review if Date of Work or Date of Training is blank (or both)?
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,466

    Re: Multiple data validation

    Is there also a date that Date of Work should not be before? Excel also considers the number 1 as a date (1 is January 1, 1900 in Excel)?

    Can the Date of Work be filled in if the Date of Review has not yet been filled in? Can the Date of Work be filled in if the Date of Training has not yet been filled in?

    Can the Date of Review be filled in if Date of Work has not yet been filled in? Can the Date of Review be filled in if Date of Training has not yet been filled in?

    Instead of giving error messages when entering, you could also choose to mark incorrectly filled in fields (for example in red) and instruct the Excel user to adjust them. Is that also an option?

  4. #4
    Forum Contributor
    Join Date
    03-12-2022
    Location
    Atlanta, Georgia
    MS-Off Ver
    365
    Posts
    109

    Re: Multiple data validation

    Hi 6stringjazzer - If they are blank then "Date of Work" would only allow if input is in the form of dates and prevent any entries (dates) that are after selected month (so anything after 7/31/23 will not be allowed).
    Last edited by KerahJoy; 07-12-2023 at 11:45 AM.

  5. #5
    Forum Contributor
    Join Date
    03-12-2022
    Location
    Atlanta, Georgia
    MS-Off Ver
    365
    Posts
    109

    Re: Multiple data validation

    Hi HansDouwe,

    "Date of Work" shouldn't before 1/1/2023.
    Any of the columns can be filled in even if other or all other columns are blank. I know this adds to the complication to find a good solution.
    I really need to prevent certain entries to be entered in order to control our data rather than just letting user of the error.

  6. #6
    Forum Contributor
    Join Date
    03-12-2022
    Location
    Atlanta, Georgia
    MS-Off Ver
    365
    Posts
    109

    Re: Multiple data validation

    Quote Originally Posted by 6StringJazzer View Post
    What is allowed for Date of Work when Date of Review or Date of Training is blank (or both)?

    What is allowed for Date of Review if Date of Work or Date of Training is blank (or both)?
    Hi 6stringjazzer - If they are blank then "Date of Work" would only allow if input is in the form of dates and prevent any entries (dates) that are after selected month (so anything after 7/31/23 will not be allowed).

  7. #7
    Forum Contributor
    Join Date
    03-12-2022
    Location
    Atlanta, Georgia
    MS-Off Ver
    365
    Posts
    109

    Re: Multiple data validation

    Quote Originally Posted by HansDouwe View Post
    Is there also a date that Date of Work should not be before? Excel also considers the number 1 as a date (1 is January 1, 1900 in Excel)?

    Can the Date of Work be filled in if the Date of Review has not yet been filled in? Can the Date of Work be filled in if the Date of Training has not yet been filled in?

    Can the Date of Review be filled in if Date of Work has not yet been filled in? Can the Date of Review be filled in if Date of Training has not yet been filled in?

    Instead of giving error messages when entering, you could also choose to mark incorrectly filled in fields (for example in red) and instruct the Excel user to adjust them. Is that also an option?
    Hi HansDouwe,

    "Date of Work" shouldn't before 1/1/2023.
    Any of the columns can be filled in even if other or all other columns are blank. I know this adds to the complication to find a good solution.
    I really need to prevent certain entries to be entered in order to control our data rather than just letting user of the error.

  8. #8
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,968

    Re: Multiple data validation

    So in short, any missing values have no effect on validation.

  9. #9
    Forum Contributor
    Join Date
    03-12-2022
    Location
    Atlanta, Georgia
    MS-Off Ver
    365
    Posts
    109

    Re: Multiple data validation

    Quote Originally Posted by 6StringJazzer View Post
    So in short, any missing values have no effect on validation.
    That is correct

  10. #10
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,968

    Re: Multiple data validation

    Here is your file with updated data validation per your rules.

    However, note that in your example there is no valid entry possible for C6. Your rules require that date to be in July and also cannot be before Date of Work which is 8/1. That's not possible.
    Attached Files Attached Files

+ 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: 4
    Last Post: 05-18-2017, 04:27 AM
  2. Data Validation Combo Box with Multiple Independent Validation Lists
    By firstofnine in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-24-2016, 04:38 PM
  3. omit menu items via data validation for multiple selections and multiple menus when select
    By themattyp503 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-03-2014, 12:16 AM
  4. Filter multiple columns based on multiple data validation fields
    By Jhunnieboy in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-30-2014, 03:41 PM
  5. Replies: 1
    Last Post: 03-19-2013, 07:03 PM
  6. Excel Data Validation - Select Multiple Items - Need to Apply Macro to Multiple Rows
    By kristynroll in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-30-2012, 07:44 PM
  7. Replies: 0
    Last Post: 12-12-2011, 07:27 PM

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