I have uploaded a zipped file to the following link. Zipped files do not automatically open with On-Line Excel which has limited functionality and problems with VBA code so download the zipped file and extract the xlsm file.
This is an example that I previously made and instead of creating a separate cell with the multiple selections from the DropDown, the multiple selections are contained in the DropDown cell.
https://1drv.ms/u/s!ArAXPS2RpafCtTJ8h3fo5mWVE9OT?e=hxvhXP
To view the VBA code it is in the worksheets module, (Right click the worksheet tab name and select "View Code" ).
If you do not want the solution with the output in the DropDown cell then please get back to me and I will modify to insert into the separate cell.
Following is a copy of the code for reference of anyone else wanting similar code.
Private Sub Worksheet_Change(ByVal Target As Range)
Dim newVal As Variant
Dim oldVal As Variant
Dim lUsed As Long
Dim arrSort As Variant
Dim j As Long
Dim i As Long
Dim varTemp As Variant
If Target.Count > 1 Then GoTo ExitHandler 'Cannot handle multiple cells (like pasting to multiple cells)
If Not Intersect(Target, Range("A:A")) Is Nothing Then 'Can edit "A:A" to a single cell or range of cells
On Error Resume Next 'Following line errors if NOT a List Type validation cell. (Therefore handle error)
If Target.Validation.Type <> 3 Then 'If NOT a List Type Validation cell so exit process
Err.Number = 0 'Cancel the error number (Suppress message in exitHandler)
GoTo ExitHandler 'NOT List Type validation so Exit Process
End If
On Error GoTo ExitHandler 'If code errors then ensures that Events are turned on again.
Application.EnableEvents = False 'Suppress recursive calls to this process
newVal = Target.Value 'Save the new value selected
Application.Undo 'Revert to the previous (Old) value
oldVal = Target.Value 'Save the previous (Old) value
Target.Value = newVal 'Revert Target to the new value
If oldVal <> "" Then 'Only process if previous value existed in cell
If newVal <> "" Then 'Only process if new value selected (rather than complete value deleted)
lUsed = InStr(1, oldVal, newVal) 'Search for new selected value in the previous existing values
If lUsed > 0 Then 'If selected value already exists
Target.Value = oldVal 'Revert to old value without adding new value
Else
Target.Value = oldVal & "," & newVal 'Concatenate Old value & New value
arrSort = Split(Target.Value, ",")
'Sort the contents of Array using bubble sort.
For j = LBound(arrSort) To UBound(arrSort) - 1
For i = LBound(arrSort) To UBound(arrSort) - 1
If arrSort(i) > arrSort(i + 1) Then
varTemp = arrSort(i)
arrSort(i) = arrSort(i + 1)
arrSort(i + 1) = varTemp
End If
Next i
Next j
Target.Value = Join(arrSort, ",") 'Re-Join the array into comma separated string
'Target.WrapText = True 'Optional: Turn On Wrap Text if required
End If
End If
End If
End If
ExitHandler:
If Err.Number <> 0 Then 'If code error caused it to be sent to here
MsgBox "An error occurred in Private Sub Worksheet_Change, Module " & Me.Name
End If
Application.EnableEvents = True
End Sub