Forum Discussion
Eqqsalad
Jul 24, 2023Copper Contributor
Default Value in Data Validation built off a table and allowing for multiple uses using VBA
Hello, Another part of a prior project I'm working on: There are two cells with two different data validation lists. List A is the primary, list B has several different lists depending on the v...
mtarler
Jul 31, 2023Silver Contributor
so how does it 'break down' on you? is the problem that sometimes the set 2 value changes to default when the value in set 1 didn't change? because I could see that code getting triggered even if the value didn't change but because the drop down was activated and then the same value was re-entered (possibly even by default actions) might trigger that code. you might need to add a secondary condition like remember the prior value either using global variable or another cell on the sheet (which is essentially a global), or maybe you can check if the value already in drop down 2 is a valid option and not change if it is a valid option regardless if drop down 1 changed or not (i.e. if 'banana' is an option for set B and set C and you change drop down 1 from set B to set C then leave banana there even if it isn't in the 'normal' default column)