Forum Discussion
OzzieKhawaja
Oct 10, 2021Copper Contributor
Creating a Dependent Drop Down List from Multiple Data (Multiple Select using VBA) in One Cell
Hi Community, I'm trying to create a second dependent drop down list but the data I want it to be dependent on as multiple data value in a cell which is inserted from a drop down list. I have use...
- Oct 10, 2021
OzzieKhawaja
Oct 16, 2021Copper Contributor
Hi Hans, how do use your colour formula to the columns I want to apply them to?
HansVogelaar
Oct 16, 2021MVP
Right-click the sheet tab and select View Code from the context menu to see the code.
The Worksheet_Change event procedure calls the UpdateValue procedure when a the user modifies a cell in B4:B50 or C4:C50, and this in its turn calls the UpdateFormat procedure.
UpdateFormat looks at the source range of the data validation dropdown for the cell, and colors each entry according to its position.
If you want to apply this to more columns, you'd have to expand both the Worksheet_Change and the UpdateFormat procedures.