steve400243
Active Member
- Joined
- Sep 15, 2016
- Messages
- 429
- Office Version
- 365
- 2016
- Platform
- Windows
Hello, I use this code to have the date and time populate in column c, starting in C13.
I would like it to also count the number of days between this date, and a date in cell B10, in cell D13. B10 would stay the same, Column C would be different dates.
Not sure if this code could be amended, or if a new one would be needed. Thank you for your help.
I would like it to also count the number of days between this date, and a date in cell B10, in cell D13. B10 would stay the same, Column C would be different dates.
Not sure if this code could be amended, or if a new one would be needed. Thank you for your help.
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub
If Not Intersect(Target, Range("B13:B5000")) Is Nothing Then
With Target(1, 2)
.Value = Date & " " & Time
.EntireColumn.AutoFit
End With
End If
End Sub