Could anyone tell me how can I adapt below VBA code to apply to selection in a column? So far it only applies to one cell (E40) and I need the multiple selection to apply to cells from E40 to E350.
Private Sub Worksheet_Change(ByVal Target As Range) ***Dim oldVal As String ***Dim newVal As String *** ***If Target.Address(0, 0) <> "E40" 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
Bookmarks