Bespoke Julian date code required

rugby_nut

New Member
Joined
Jan 13, 2009
Messages
42
Hi all,

I need to produce a Julian date code that only has the last digit of the year, followed by the days, followed by a fixed number A1234. So for example the date 14/10/2022 would be 2287A1234.
I understand this will look the same for 2022 and 2032 but this is how the company works and it will only run for around 2 years.

Additionally.....:) I have another challenge, I want to produce the same Julian date code from the Friday to be the same for each day in a calendar week. So for example, WK43 which is Sun 16/10/22 to Sat 22/10/22 should all produce 2294A1234, see the example image below.

Any help will be greatly received. Thank you.

1665744338081.png
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
I need to produce a Julian date code that only has the last digit of the year, followed by the days, followed by a fixed number A1234. So for example the date 14/10/2022 would be 2287A1234.
I understand this will look the same for 2022 and 2032 but this is how the company works and it will only run for around 2 years.
For a date in cell A2, you can use this formula:
Rich (BB code):
=RIGHT(YEAR(A2),1) & (A2-DATE(YEAR(A2),1,1)+1) & "A1234"
Note that I color-coded the 3 different pieces that make up your value so that it is easier to see how it is working.

I'll will have to think a bit on the second question. That one will be a bit tricky.
 
Upvote 0
For the second part, try this variation:
Rich (BB code):
=RIGHT(YEAR(A2),1) & (A2-DATE(YEAR(A2),1,1)+7-WEEKDAY(A2)) & "A1234"
 
Upvote 0
Solution
You are welcome.
Glad I was able to help!
 
Upvote 0

Forum statistics

Threads
1,214,641
Messages
6,120,695
Members
448,979
Latest member
DET4492

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