+ Reply to Thread
Results 1 to 10 of 10

Changing one validation cell should reset another

  1. #1
    Registered User
    Join Date
    11-08-2013
    Location
    The Internet
    MS-Off Ver
    Mac Excel 2011
    Posts
    1

    Changing one validation cell should reset another

    Hi there! First time posting but this forum comes highly recommended. I'm fairly new to Excel but I'll try to make clear what I'm trying to do.

    My sheet has a Data Validation drop down menu "Department", where the user selects a Department. Based on this selection, another Data Validation cell "Team Leader" gives a list of Team Leaders to choose from. This works perfect. Change the Department, you get a different list of names. The problem is that if I have both a Department and a Team Leader selected, and then I change the Department selection, it keeps the Team Leader cell filled with now invalid data (the Team Leader from the previous department). If I then click on the Team Leader cell, it has the correct names listed to choose from, but until I do that cell retains the old information. Is there any way to blank the "Team Leader" cell, or push data to it (I've included a Choose a Team Leader entry in my list of people), when I change my Department selection?

    I've included a sample file to hopefully show what I'm trying to explain.
    Attached Files Attached Files

  2. #2
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Changing one validation cell should reset another

    Hi and welcome to the forum!

    I'm not entirely sure whether this is possible without VBA. I doubt it, however, as it would seem you always end up with a (conflicting) requirement of a list form of data validation and an in-cell formula. Without a drop-down option, certainly, but with...

    Anyway, I've asked for some assistance so, hopefully - VBA or not - someone will be able to answer your question shortly.

    Regards
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,451

    Re: Changing one validation cell should reset another

    As far as I know, you would need VBA to clear dependent drop down values.


    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Changing one validation cell should reset another

    A nonVBA workaround, you can use CONDITIONAL FORMATTING to change the font to white (or whatever the background color of the cell is) if the current value does not match the options in the currect DV options for that cell. This doesn't remove the incorrect value, but hides it, visually the same effect.

    Apply this formula in a CF to cell Q3: =NOT(ISNUMBER(MATCH(Q3, TEAM, 0)))
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  5. #5
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Changing one validation cell should reset another

    I'm afraid I'm not familiar with Excel for Mac - but assuming VBA works the same way as in Excel 2010 for Windows, then pop the following into the Worksheet module:

    Please Login or Register  to view this content.
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  6. #6
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,731

    Re: Changing one validation cell should reset another

    One thing you can do is to apply conditional formatting to cell Q3 using this formula:

    =ISNA(MATCH(Q3,TEAM,0))

    and then choosing say a white foreground on a red background (fill), so that the incorrect/invalid entry is highlighted immediately that you change the choice of department in L3.

    Hope this helps.

    Pete

  7. #7
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Changing one validation cell should reset another

    sample to test if the current q3 entry is invalid when L3 is changed
    Please Login or Register  to view this content.
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  8. #8
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Changing one validation cell should reset another

    Please Login or Register  to view this content.

  9. #9
    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: Changing one validation cell should reset another

    Hi CorakTM

    If I understand your issue and this works on the Mac, place this Code in Sheet AHT_Issues Sheet Module
    Please Login or Register  to view this content.
    When you change Cell L3 Cell Q3 is made empty.

    Copy the Code
    Right Click on Tab --> AHT_Issues
    Select -- > View Code
    Paste the Code in the right hand window
    Close VBA --> Alt + F11
    Save the File
    Last edited by jaslake; 11-12-2013 at 09:34 PM.
    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.

  10. #10
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Changing one validation cell should reset another

    Looking at JosephP's solution, I would expect you could implement a generalised solution for all cells in a worksheet without affecting workbook performance too much.
    Please Login or Register  to view this content.

+ 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. [SOLVED] Reset dependant validation list when the previous validation list is changed.
    By Rimmu in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-10-2012, 09:23 AM
  2. Changing value of Data validation list when another cell changes
    By chamdan in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-01-2011, 02:38 PM
  3. Replies: 1
    Last Post: 03-14-2011, 11:37 AM
  4. Changing cell validation on a protected sheet
    By agentsmith83 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-18-2011, 12:33 PM
  5. Dynamic/dependent data validation lists - reset second cell if first cell changed
    By gazza365 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-16-2010, 06:59 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