VBA Script which adds a Julian Day to a cell

EO4oOJQ9Sm

New Member
Joined
Mar 16, 2012
Messages
4
I have an excel document with two Sheets.
Sheet One (Worklog) displays my daily work log.
Column A on Sheet One lets me choose work tasks from my list on Sheet 2.
Sheet 2 (List) has a list of tasks that I do each week.
The task I am concerned with in the list is End Day.
So in my first Sheet. I can click in Column A and select End Day from the list
and in Column G it will display "End Day".

Below is the script I use to get the text End Day to display.

How do I add the Julian day after the text End Day?


If Target.Cells.Value = "End Day" Then
MsgBox Intersect (Target, Range ("A1:A10000"))
With Target (1,7)
.value = "End Day"

Also in Sheet 2 (List) I have A30 set to display the current day =TODAY()
I have A31 set to Display the Julian Date =A30-(DATE(YEAR(A30),1,1)-1)
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Hi, it sounds like sheet1's cells G1 and A1 will display the same thing (G1 displays whatever you select for A1). Are you trying to get cell H1 to display the Julian date?
 
Upvote 0

Forum statistics

Threads
1,215,370
Messages
6,124,526
Members
449,169
Latest member
mm424

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top