+ Reply to Thread
Results 1 to 4 of 4

Data Validation allowing items from one list but not allowing items from another list.

  1. #1
    Registered User
    Join Date
    07-21-2014
    Location
    Montana
    MS-Off Ver
    2013
    Posts
    12

    Data Validation allowing items from one list but not allowing items from another list.

    Is there a way to setup a data validation that would allow any item from one list, but would not allow any item from a second list? The column I am talking about is for Carrier Names. The Carrier Names list is always changing so they need to be able to add to this list, but I don't want anyone to be able to add a name that is contained in our Supplier list to the Carrier Name list.

    Thanks.

  2. #2
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Data Validation allowing items from one list but not allowing items from another list.

    You can do this with Data Validation.

    In Data Validation, Allow CUSTOM, enter a formula like this substituting your ranges for the first list that you don't want in the second list
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    In this example there is a list in A1:A10 and the new list is going to be in column B. Select column B and create the Data Validation rule. Now when entering data in column B, if that entry is in column A, it will not be allowed.
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  3. #3
    Registered User
    Join Date
    07-21-2014
    Location
    Montana
    MS-Off Ver
    2013
    Posts
    12

    Re: Data Validation allowing items from one list but not allowing items from another list.

    When I put the formula in, I was still able to enter a supplier name in the carrier name field. I also have an auto-fill (through VBA) dropdown in the carrier name column that no longer is there when I enter the countif formula. Below is what I entered.

    =COUNTIF(Suppliers!$A$1:$A$1762,'Dispatch Carrier'!A1)=0

  4. #4
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Data Validation allowing items from one list but not allowing items from another list.

    Ok, the formula that I should have given you is:

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


    This works if you manually enter the values in column B but copying values into column B or entering via VBA will not be stopped.

    You could use this formula on the worksheet to identify the incorrect entries and then filter them out for deletion:

    Enter in column C and fill down.
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    A VBA solution to this I think is quite possible. Maybe a VBA expert will chime in.

+ 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: 1
    Last Post: 05-15-2013, 01:55 PM
  2. Data validation list allowing errors?
    By Pyrex238 in forum Excel General
    Replies: 5
    Last Post: 01-17-2013, 02:33 PM
  3. Macro to select Validation List & allowing Worksheet_change to operate
    By jordan2322 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-17-2012, 08:44 PM
  4. Data Validation: items in one list relate to items in another
    By Paul D. Simon in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-04-2005, 05:05 PM
  5. Replies: 1
    Last Post: 06-24-2005, 12:21 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