Hi All, I am new to VBA in excel and I cannot find an answer anywhere on google. I'm attempting to have a drop down box in multiple columns that allow me to choose multiple values separated by a semi colon. I found this code but I cannot get it to adapt to multiple columns. I do not take credit for the original creation of this VBA - just trying to adapt it to my means.

Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
Dim rngDV As Range
Dim oldVal As String
Dim newVal As String
Dim lUsed As Long
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 = 25 Then
If oldVal = "" Then
'do nothing
Else
If newVal = "" Then
'do nothing
Else
lUsed = InStr(1, oldVal, newVal)
If lUsed > 0 Then
Target.Value = oldVal
Else
Target.Value = oldVal _
& ", " & newVal
End If

End If
End If
End If
End If

exitHandler:
Application.EnableEvents = True
End Sub


I added If Target.Column = 25 or 27 but that just blew up the entire sheet. I just want to apply this bit of code to two columns... Any help would be greatly appreciated!