title: Ambiguous name detected: Worksheet_change
body: <p>I'm attempting to add a second code to a single worksheet and keep getting the "Ambiguous name detected" error. Realise that I need to combine the two codes but having trouble doing so. here are the two codes, one below the other:</p>
  
  <pre><code>Private Sub Worksheet_Change(ByVal Target As Range)
  
  
          'are changes made within answer range?
  
      Set isect = Application.Intersect(Target, Range("Answers"))
  
      If Not (isect Is Nothing) Then
  
          For Each chng In Target.Cells
  
              'Get row number
  
              startY = Impact.Range("Answers").Row
              targetY = chng.Row
              row_offset = (targetY - startY) + 1
  
              rating_type = Impact.Range("Impacts").Cells(row_offset, 1)
  
              If rating_type = "Major / V.High" Then cols = 16711884
              If rating_type = "Significant / High" Then cols = 255
              If rating_type = "Important / Moderate" Then cols = 49407
              If rating_type = "Minor / Low" Then cols = 5287936
              If rating_type = "" Then cols = 16777215
  
              Impact.Range("Ratings").Cells(row_offset, 1).Interior.Color = cols
              Impact.Range("Impacts").Cells(row_offset, 1).Interior.Color = cols
  
          Next chng
  
      End If
  
  End Sub
  Private Sub Worksheet_Change(ByVal Target As Range)
  ' To Select Multiple Items from a Drop Down List in Excel
  Dim Oldvalue As String
  Dim Newvalue As String
  Application.EnableEvents = True
  On Error GoTo Exitsub
  If Target.Address = "$C$2" Then
    If Target.SpecialCells(xlCellTypeAllValidation) Is Nothing Then
      GoTo Exitsub
    Else: If Target.Value = "" Then GoTo Exitsub Else
      Application.EnableEvents = False
      Newvalue = Target.Value
      Application.Undo
      Oldvalue = Target.Value
        If Oldvalue = "" Then
          Target.Value = Newvalue
        Else
          If InStr(1, Oldvalue, Newvalue) = 0 Then
              Target.Value = Oldvalue &amp; ", " &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>Was hoping someone knows how to combine the two in order to circumvent this error.</p>
  
  <p>Thanks in advance!</p>