+ Reply to Thread
Results 1 to 4 of 4

Data validation that only allows data entry based on specific criteria?

  1. #1
    Forum Contributor
    Join Date
    05-09-2019
    Location
    South West
    MS-Off Ver
    365
    Posts
    108

    Data validation that only allows data entry based on specific criteria?

    Hi all,

    I'm wondering if someone can help. I'm trying to set up a data validation that will only allow a user to input a value in a cell, if another cell meets certain criteria.

    In my example, I have a list of items in column A, column B asks for how many millilitre the item holds, however, because only certain items could possibly contain liquids, I want the user to only be allowed to put in a number if the item is one which is on my "list" tab (therefore, where I've highligted a cell in red they shouldn't be able to put in a value and if it's green they should be able to).

    I was also hoping to apply some conditional formatting using the same logic as above, whereby the cell (in column B) would turn red if it's an item not on the list and green if it's an item on the list...but I can't seem to figure that out either.

    Does anyone have any ideas? I've tried googling this but I just can't quite figure out the formula I need to use.

    Many thanks in advance !
    Attached Files Attached Files

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,482

    Re: Data validation that only allows data entry based on specific criteria?

    What you want is a true or false statement.

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Place in datavalidation for B2, then drag cell down

    2020-09-28_6-24-58.jpg

  3. #3
    Forum Contributor
    Join Date
    05-09-2019
    Location
    South West
    MS-Off Ver
    365
    Posts
    108

    Re: Data validation that only allows data entry based on specific criteria?

    Hi davesexcel , thank you so much for this, this is exactly what I needed !

    I applied this formula to the conditional formatting as well (without the >0 at the end) and it now highlights the cell to be filled in if the item is in the list in green.

    But is there a way to do the reverse i.e. if the item is NOT on the list, for example I could set the cell to turn to grey? I'm not sure how you set a formula to say "if this is NOT is this list".

    Thank you again !

  4. #4
    Forum Contributor
    Join Date
    05-09-2019
    Location
    South West
    MS-Off Ver
    365
    Posts
    108

    Re: Data validation that only allows data entry based on specific criteria?

    Actually never mind, I found a way to do the above, I used the same formula you had, but putting =0 at the end did the trick

    Thanks again for your help!

+ 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. Create Sheet Templates based off Data Validation Entry
    By mdefedele in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-16-2020, 02:16 AM
  2. [SOLVED] VBA to Prevent Data Entry in Cell with Data Validation List - Two Criteria Validation
    By AliGW in forum Excel Programming / VBA / Macros
    Replies: 21
    Last Post: 05-25-2019, 11:48 AM
  3. Replies: 3
    Last Post: 03-30-2019, 12:48 PM
  4. Replies: 3
    Last Post: 12-18-2015, 03:16 PM
  5. Replies: 4
    Last Post: 06-30-2013, 09:37 AM
  6. Auto entry of Data if criteria is met in specific column
    By iamreese in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-27-2012, 10:31 AM
  7. Validation based on data entry
    By numberwang in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-10-2009, 04:00 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