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

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).

Forum statistics

Threads
1,223,903
Messages
6,175,284
Members
452,630
Latest member
OdubiYouth

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