Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Multiple choice in dropdown list
Hi,
I needed to make a cell to collect all the options chosen in a list as described in the example DV0017 - Select Multiple Items from Dropdown List of Debra Dalgleish, which was very helpful. The problem is that I need it to work for 2 different columns and each of them should collects the options from different lists. When I tried to apply it for 2 different targets I get an error. Is there anyone that could help me? Thank you! |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Multiple choice in dropdown list
I need to reformulate my question.
The thing is I found in the file how to apply the option for different columns, but it inserts the options in different rows. In the example below the options are added in the same cell with line breaks. How could I apply it to another column according to what is written below? Thank you. __________________________ Option Explicit Private Sub Worksheet_Change(ByVal Target As Range) Dim rngDV As Range Dim oldVal As String Dim newVal As String If Target.Count 1 Then GoTo exitHandler On Error Resume Next Set rngDV = Cells.SpecialCells(xlCellTypeAllValidation) On Error GoTo exitHandler If rngDV Is Nothing Then GoTo exitHandler If Intersect(Target, rngDV) Is Nothing Then 'do nothing Else Application.EnableEvents = False newVal = Target.Value Application.Undo oldVal = Target.Value Target.Value = newVal If Target.Column = 19 Then If oldVal = "" Then 'do nothing Else If newVal = "" Then 'do nothing Else Target.Value = oldVal _ & Chr(10) & newVal End If End If End If End If exitHandler: Application.EnableEvents = True End Sub "Augusta" wrote: Hi, I needed to make a cell to collect all the options chosen in a list as described in the example DV0017 - Select Multiple Items from Dropdown List of Debra Dalgleish, which was very helpful. The problem is that I need it to work for 2 different columns and each of them should collects the options from different lists. When I tried to apply it for 2 different targets I get an error. Is there anyone that could help me? Thank you! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Drop-Down List Choice Affects Multiple Cells? | Excel Worksheet Functions | |||
VBA code to open dropdown box(s) in XL, permit a choice, then resu | Excel Discussion (Misc queries) | |||
How do i create a multiple choice drop down list | Charts and Charting in Excel | |||
Dropdown list/Multiple choice?? | Excel Discussion (Misc queries) | |||
how to create multiple hyperlinks within a dropdown list | Excel Discussion (Misc queries) |