+ Reply to Thread
Results 1 to 4 of 4

VBA not working with existing cell validation

  1. #1
    Registered User
    Join Date
    02-19-2014
    Location
    Ohio
    MS-Off Ver
    Excel 2010
    Posts
    2

    VBA not working with existing cell validation

    I have a series of dropdown boxes where, if cell B2 has a value, this value will filter through and populate the dropdown cells via VBA. This works, however, if invalid data is entered in B2, the dropdown cells still allow the bad data, where if i enter the same info directly in Excel, it gives me an invalid data error. Why the difference?

    In the code below, B2 is named "Provide_SKU". B2 is split into the appropriate parts in row 3, then row 8 (the dropdowns) is set equal to row 3.

    Please Login or Register  to view this content.

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: VBA not working with existing cell validation

    Hi and welcome to the forum.

    I'm not sure I understand the requirement. Would you upload the workbook and tell us what actions you want to take and what results you would expect.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    02-19-2014
    Location
    Ohio
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: VBA not working with existing cell validation

    Hi, Thanks for the welcome.ABH_Config-Forum.xlsm

    I'd like to be able to paste a SKU in B2 (there are test "valid" skus available below) and have it fill the dropdowns with valid data. It is filling the dropdowns, but if I enter invalid data in B2, it does not alert me. If the user enters invalid data, give an alert or somehow show that this is invalid. If I type the data wrong directly in the cell, or use a formula in cell B8 to say =B3, it does not allow it. But the VBA is accepting bad data if entered in B2. Make sense?
    Last edited by Meghanao; 05-12-2015 at 10:44 AM.

  4. #4
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: VBA not working with existing cell validation

    Hi Meghanao

    Add a Dynamic Named Range called Test_SKUS then add these Lines of Code to your Sheet Change Code
    Please Login or Register  to view this content.
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

+ 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. Data Validation not working,for excel validation Please Help!!!
    By angelmama in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 07-09-2014, 10:06 AM
  2. Validation with ISTEXT not working when a number in cell
    By Galley in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-04-2012, 10:33 AM
  3. Need a override for already existing List validation
    By appunu in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-21-2010, 03:15 PM
  4. validation rules not working when someone copy paste data on validation cell
    By jthakrar in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 05-17-2010, 03:36 AM
  5. Excel 2007 : Working With Existing Lists
    By grghhn in forum Excel General
    Replies: 2
    Last Post: 10-15-2009, 02:16 PM

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