![]() ![]() StrValidList = strValidList & Sheets("Data").Cells(intRow, 2) & " ~ " & Sheets("Data").Cells(intRow, 4) & ", " StrValidList = strValidList & Sheets("Data").Cells(intRow, 2) & " ~ " & Sheets("Data").Cells(intRow, 3) & ", " If Sheets("Data").Cells(intRow, 1) = Target.Offset(0, -1) Then Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Range) Target.Value = Left(Target.Value, InStr(1, Target.Value, "~") - 2) ![]() If Target.Column = 2 And CHANGING_VAL = False Then Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range) Dim CHANGING_VAL As Boolean 'Global Variable that can be set to prevent the onchange being fired when the Macro is removing the description from the dropdown. ![]() The code is not perfect but more just a proof of concept and something to give you a big head start. The colour of the text in column B is changed to blue once an option has been selected but the Green and Red text that you wanted is not really possible as in the in-cell dropdown always displays black regardless of the cell's font colour. It's an interesting problem and I got the code below to work using the method of setting validation on the cell in column B when a Dimension code is entered in column A. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |