Fixing date of entry
I'll have a try later this afternoon when my round of golf is complete.
Unless someone else leaps in before I get back(wink, wink..nudge, nudge)
Gord
On Wed, 11 May 2011 01:57:05 +0100, Colin Hayes
wrote:
In article , Gord Dibben
writes
Good to hear.
Gord
Hi
Thanks for your help with this.
I see the code works on columns A & B. Would it be an easy thing to
modify it so that it works across the other rows in the worksheet?
Ideally I'm trying to have 12 months worth across.
Effectively this would mean columns A ,C , E , G etc individually
displaying the date when text is entered to B , D , F . H ....
Could the code be amended to fit this condition?
Private Sub Workbook_SheetChange(ByVal Sh As Object, _
ByVal Target As Range)
On Error GoTo enditall
Application.EnableEvents = False
If Target.Cells.Column = 2 Then
n = Target.Row
With ActiveSheet
If .Range("B" & n).Value < "" Then
.Range("A" & n).Value = Date
Else: .Range("A" & n).Value = ""
End If
End With
End If
enditall:
Application.EnableEvents = True
End Sub
Grateful for any assistance.
|