title: Apply VBA code to multiple columns - to allow selection of multiple options from data validation list
body: <p>I have set up a spreadsheet with several columns, some of which have data validation dropdown lists.  I need users to be able to select multiple options from the dropdown list. I have achieved this for one column using the VBA below, however I am struggling to find the right way to apply this to multiple columns. Please could someone help.
  At the moment I have used 'Target.Column = 9', however I need to apply this to columns 3,4,5,6,9.</p>
  <pre><code>Private Sub Worksheet_Change(ByVal Target As Range)
  
  Dim Oldvalue As String
  Dim Newvalue As String
  Application.EnableEvents = True
  On Error GoTo Exitsub
  If Target.Column = 9 Then
    If Target.SpecialCells(xlCellTypeAllValidation) Is Nothing Then
      GoTo Exitsub
    Else: If Target.Value = &quot;&quot; Then GoTo Exitsub Else
      Application.EnableEvents = False
      Newvalue = Target.Value
      Application.Undo
      Oldvalue = Target.Value
        If Oldvalue = &quot;&quot; Then
          Target.Value = Newvalue
        Else
          If InStr(1, Oldvalue, Newvalue) = 0 Then
              Target.Value = Oldvalue &amp; &quot;, &quot; &amp; Newvalue
        Else:
          Target.Value = Oldvalue
        End If
      End If
    End If
  End If
  Application.EnableEvents = True
  Exitsub:
  Application.EnableEvents = True
  End Sub
  </code></pre>
  <p>Thanks in advance</p>