Hello I have added VBA code (thanks to this forum) to allow me to add multiple pick lists but I only want it in 2 columns but it appears to be adding the option (& thus duplication issues) across most columns.
I have used the code below:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim oldVal As String
Dim newVal As String
If Target.Count > 1 Then Exit Sub
If Intersect(Range("$P$3:$P50", "$AA$3:$AA50"), Target) Is Nothing Then Exit Sub
On Error GoTo ReEnable
Application.EnableEvents = False
newVal = Target.Value
Application.Undo
oldVal = Target.Value
Target.Value = newVal
If oldVal <> "" And newVal <> "" Then
Target.Value = oldVal & ", " & newVal
End If
ReEnable:
Application.EnableEvents = True
End Sub
Can anyone help?
thanks
Alison
I have used the code below:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim oldVal As String
Dim newVal As String
If Target.Count > 1 Then Exit Sub
If Intersect(Range("$P$3:$P50", "$AA$3:$AA50"), Target) Is Nothing Then Exit Sub
On Error GoTo ReEnable
Application.EnableEvents = False
newVal = Target.Value
Application.Undo
oldVal = Target.Value
Target.Value = newVal
If oldVal <> "" And newVal <> "" Then
Target.Value = oldVal & ", " & newVal
End If
ReEnable:
Application.EnableEvents = True
End Sub
Can anyone help?
thanks
Alison