Home |
Search |
Today's Posts |
|
#1
![]() |
|||
|
|||
![]()
I can display weeknumber but I need in front year code in 2 cifers.
Does anyone knows easy solution? |
#2
![]() |
|||
|
|||
![]()
=TEXT(A1,"yy")&TEXT(weeknum(A1),"00")
-- HTH RP (remove nothere from the email address if mailing direct) "Lubo" wrote in message ... I can display weeknumber but I need in front year code in 2 cifers. Does anyone knows easy solution? |
#3
![]() |
|||
|
|||
![]()
On Tue, 8 Nov 2005 03:50:15 -0800, "Lubo"
wrote: I can display weeknumber but I need in front year code in 2 cifers. Does anyone knows easy solution? =TEXT(date,"yy")&TEXT(weeknum(date),"00") will display a two digit year followed by a two digit weeknumber. Note that the Excel Weeknum function uses "Excel's definition" of weeknumber which is not the ISO standard. If you want to use the ISO standard weeknumber, you'll need a VBA User Defined Function or a complicate worksheet function. The VBA code for ISO weeknum: -------------------- Function ISOWeeknum(dt As Date) As Integer ISOWeeknum = DatePart("ww", dt, vbMonday, vbFirstFourDays) If ISOWeeknum 52 Then If DatePart("ww", dt + 7, vbMonday, vbFirstFourDays) = 2 Then ISOWeeknum = 1 End If End If End Function --------------------- --ron |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
t-distribution puzzle in Excel | Excel Discussion (Misc queries) | |||
Conform a total to a list of results? | Excel Discussion (Misc queries) | |||
Macro for changing text to Proper Case | Excel Worksheet Functions | |||
How can I make Excel display HTML code as text | Excel Discussion (Misc queries) | |||
Display specific rows from table on other worksheet | Excel Discussion (Misc queries) |