Hello there,
I have a worksheet that has the following code:
Private Sub Worksheet_Change(ByVal Target As Range)
' if changes are made in column B, update column A
If (Not Intersect(Target, Range("B5:B350")) Is Nothing) Then
ColumnAChanging = True
If Target <> "" Then
Target.Offset(0, -1) = Now
Else
Target.Offset(0, -1).ClearContents
End If
ColumnAChanging = False
' if changes made in column A (and not by above change), update column C
ElseIf (Target.Column = 1 And Not ColumnAChanging) Then
If (Target <> "") Then
Target.Offset(0, 2) = Now
Else
Target.Offset(0, 2).ClearContents
End If
End If
End Sub
Private Sub Worksheet_Activate()
Dim r As Range
ColumnAChanging = False ' allow changes in column a
On Error Resume Next
With Me
Set r = .Columns("A").SpecialCells(xlCellTypeBlanks)
If r Is Nothing Then
.Cells(.Rows.Count, "a").End(xlUp)(2).Select
Else
r(1).Select
End If
End With
End Sub
So here is what is happening on the work sheet.
In A3 etc. a number is entered.
It will then populate the current date in C3
A date is then manually entered in B3 etc.
This only works for row 3 & 4
Once we get to row 5 own ward
In A5 a number is entered
The current date populates in C5
But once you enter in the manual date on C2
A5 changes to ####### - and when you expand the cell it is time stamping cell for current date and time?
Any suggestions on how to fix?
Need more info? Is it something to do with the code above?
Bookmarks