+ Reply to Thread
Results 1 to 4 of 4

Multiple Data Validations

  1. #1
    Registered User
    Join Date
    08-10-2016
    Location
    Ireland
    MS-Off Ver
    2013
    Posts
    67

    Multiple Data Validations

    Hi Folks,

    I need multiple data validations on many cells on an excel worksheet;

    1. We should only be able to input numbers greater than 0 in cells F6 and F7 and if something else we will input, should get an error.
    2. We should not be able to enter anything if cell F5 = "No", we can only enter numbers when F5 = "Yes".
    3. If we select F5 = "Yes", and then enter numbers in F6 and F7 and then select F5 = "No", it should erase the values from F6 and F7.

    Hope I am clear with the need. The sample is attached for better understanding.

    Thanks in advance...
    Abhi
    Attached Files Attached Files

  2. #2
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,461

    Re: Multiple Data Validations

    1+2): Yes.
    Try Data Validation, Allow: Custom
    =AND($F$5="Yes",F6+0>0)

    3) When F5 change to "No", F6 and F7 still contain current value. If it was expected to blank, VBA may helps.
    Quang PT

  3. #3
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,577

    Re: Multiple Data Validations

    3) you need worksheet event code
    Code
    Please Login or Register  to view this content.
    Worksheetevent

    To paste the code
    Right click on Sheet tab --> view code
    Visual Basic (VB) window opens.
    Paste the code
    Close the VB window.
    Last edited by kvsrinivasamurthy; 04-19-2021 at 12:17 AM.
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

  4. #4
    Registered User
    Join Date
    08-10-2016
    Location
    Ireland
    MS-Off Ver
    2013
    Posts
    67

    Re: Multiple Data Validations

    Many Thanks. Got you.

+ 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. HELP !!! Multiple data validations
    By pradisdeep in forum Excel General
    Replies: 4
    Last Post: 07-11-2014, 02:22 PM
  2. Multiple Data Validations and IF statements
    By Hollow55 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-07-2013, 11:28 AM
  3. Multiple Data Validations In Cell using VBA
    By MSBECCA23 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-22-2013, 12:44 PM
  4. Multiple data validations for 1 cell
    By jghender in forum Excel General
    Replies: 1
    Last Post: 11-07-2012, 01:36 PM
  5. Multiple Related Data Validations
    By Flyinace2000 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-24-2012, 12:53 PM
  6. Multiple Data Validations
    By Phoenix5794 in forum Excel General
    Replies: 2
    Last Post: 08-15-2012, 10:44 AM
  7. If statements using multiple data validations sets
    By stuxtruth in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-19-2008, 08:12 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