Dublin Irish
New Member
- Joined
- Dec 9, 2020
- Messages
- 5
- Office Version
- 365
- 2019
- Platform
- Windows
- MacOS
Hello all,
I need this code to work from column 10 onwards but from row 2 down and not include row 1. Could you please advise what I can do about this?
I need this code to work from column 10 onwards but from row 2 down and not include row 1. Could you please advise what I can do about this?
VBA Code:
Dim Oldvalue As String
Dim Newvalue As String
On Error GoTo Exitsub
If Target.Column >= 10 And Target.Column <= 300 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
Target.Value = Oldvalue & ", " & Newvalue
End If
End If
End If
Application.EnableEvents = True
Exitsub:
Last edited by a moderator: