days of year

cyborgt100

New Member
Joined
Mar 27, 2019
Messages
6
hi guys having problem i trying create a code so depend on what day it is the code change
prefix is L and the next two number is YY year and the 3 last numbers is DDD (001 - 366) but in number format not words like Sun or Mon so in the case than 366 would be Feb 29 or 206 would be 25 of july. i try vlookup table but it did work either


Code:
Sub LotNumbers()


Result = MsgBox("Do you need a lot number?", vbYesNo + vbQuestion)
If Result = vbYes Then
Range("J6").Select
Selection.Font.Color = vbGreen
Selection.Font.Bold = True
dates = Format(Now, "dd,mmm")
Range("J6").Value = "L" & Format(Now, "yy")  & Format(Now, "ddd")
MsgBox "lot number complete "
Else:
Range("J6").Clear
MsgBox "You have No to lot number"
End If
End Sub

all help would be create
 
Have you created a function called year?
 
Upvote 0

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.

Forum statistics

Threads
1,224,823
Messages
6,181,180
Members
453,021
Latest member
Justyna P

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