- Joined
- Feb 27, 2012
- Messages
- 5
- Reaction score
- 0
This is my first question on here so oplease be gentle with me.
I have some code below that allows me to insert some text in col a,b,c,d,e and f and the date is output in col g. This works fine for me but when i copy and paste more than one row of info the date is not input in either of the col g.
The answer must be easy but i am not sure and would welcome the help.
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count > 10 Then Exit Sub
If Not Intersect(Target, Range("A2:A10000")) Is Nothing Then
With Target(1, 7)
.Value = Date
.NumberFormat = "dd/mm/yyyy"
.EntireColumn.AutoFit
End With
End If
End Sub
I have some code below that allows me to insert some text in col a,b,c,d,e and f and the date is output in col g. This works fine for me but when i copy and paste more than one row of info the date is not input in either of the col g.
The answer must be easy but i am not sure and would welcome the help.
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count > 10 Then Exit Sub
If Not Intersect(Target, Range("A2:A10000")) Is Nothing Then
With Target(1, 7)
.Value = Date
.NumberFormat = "dd/mm/yyyy"
.EntireColumn.AutoFit
End With
End If
End Sub