Weeknum function with 2 digits When I use the weeknum function to find the weeks
ID: 3565780 • Letter: W
Question
Weeknum function with 2 digits
When I use the weeknum function to find the weeks of the year, all weeks that only have 1 digit (all weeks from 1-9) will appear with only one digit. The rest of the weeks appear with 2 digits. How can I make the result in the weeknum function give me the weeks with 2 digits! I need week 1 to look like 01, week 2 to look like 02 an so on.
In addition I want to use this in a string when I concatenate the week pluss the year. Example:
I have written the date 01.01.2012 in cell A1.
The formula looks like this: =CONCATENATE(WEEKNUM(A1);YEAR(A1)) - th result looks like this: 12012
I want the result to look lik 012012
The reason is because I want to use the number in sorting sequenzes, and if the week is 01 it should say 012012, if the week is 11 it should say 112012.
How to show result (the week number) with 2 digits very easily inside this mixed function???
thanks all !
Explanation / Answer
Hi,
You can do this..
=CONCATENATE(TEXT(WEEKNUM(A1),"00""),YEAR((A1))
If you sort by this column Excel will prompt you if you want to sort anything that looks like a number as number, click OK!
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.