buttergoose
New Member
- Joined
- Dec 19, 2023
- Messages
- 5
- Office Version
- 365
- Platform
- Windows
Hello again,
Thanks to this sub I perfected the last code I needed help with. In short, for work we use excel to log events, this code populates my desired cells with date and time when the event cell is being filled in.
Has worked great, but now I want another cell to populate with the current Julian Day counting from 0-365 (ie: jan 27th = 27, feb 7th = 38 and so on).
I want this in single digit in the cell, only the day. I am unsure if "Julian day" is the proper term but that is what my work calls it and I hope you understand what I mean.
Below is the code that I've been using successfully
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count = 1 Then
If Not Intersect(Target, Columns("G")) Is Nothing Then
If Target.Row > 1 And Target.Offset(, 2) = "" Then
If Target.Offset(, -6) = "" Then
Target.Offset(, -6) = Date
Target.Offset(, -4) = Time
End If
End If
End If
End If
End Sub
So, I would like to have something like (hypothetically: TargetOffset(, -3) = Julian Day
Thank you in advance!
Thanks to this sub I perfected the last code I needed help with. In short, for work we use excel to log events, this code populates my desired cells with date and time when the event cell is being filled in.
Has worked great, but now I want another cell to populate with the current Julian Day counting from 0-365 (ie: jan 27th = 27, feb 7th = 38 and so on).
I want this in single digit in the cell, only the day. I am unsure if "Julian day" is the proper term but that is what my work calls it and I hope you understand what I mean.
Below is the code that I've been using successfully
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count = 1 Then
If Not Intersect(Target, Columns("G")) Is Nothing Then
If Target.Row > 1 And Target.Offset(, 2) = "" Then
If Target.Offset(, -6) = "" Then
Target.Offset(, -6) = Date
Target.Offset(, -4) = Time
End If
End If
End If
End If
End Sub
So, I would like to have something like (hypothetically: TargetOffset(, -3) = Julian Day
Thank you in advance!