Hello,
Please tell me if there are any formulas or another posibility for excel to show the week numbers between 2 dates.
For example for 05.08.2018- 19.08.2018 to show week 32-33-34.
Thank you!
Hello,
Please tell me if there are any formulas or another posibility for excel to show the week numbers between 2 dates.
For example for 05.08.2018- 19.08.2018 to show week 32-33-34.
Thank you!
not exactly what you asked see the below
if you have your dates in A1 & B1 use below formula
=WEEKNUM(A1)&" to "&WEEKNUM(B1)
Samba
Say thanks to those who have helped you by clicking Add Reputation star.
Then is is posible to make show the values between 2 numbers ? For example 34 and 37 and to show 34,35,36,37.
It is possible by vba or by typing out a range of all the week numbers, that can be referenced by a formula
https://stackoverflow.com/questions/...ween-2-numbers
I hesitate to give you this but it accomplishes your (hopefully limited) range...
=IF(ABS(WEEKNUM(A1)-WEEKNUM(B1))>2,WEEKNUM(A1)&"-"&WEEKNUM(A1)+1&"-"&WEEKNUM(A1)+2&"-"&WEEKNUM(B1),IF(ABS(WEEKNUM(A1)-WEEKNUM(B1))>1,WEEKNUM(A1)&"-"&WEEKNUM(A1)+1&"-"&WEEKNUM(B1),WEEKNUM(A1)&"-"&WEEKNUM(B1)))
so if the older date is in A1 and more recent date in B1 this will return 34-35-36-37 which is what you showed in post #1, if you want commas replace "-" with ","
but it is limited for up to four week differences. For larger differences it will need more if then statements which is why I hesitate to give it to you, it gets ugly in a hurry.
and if you reverse the order (B1 then A1) you don't need the abs part to this...
=IF(WEEKNUM(B1)-WEEKNUM(A1)>2,WEEKNUM(A1)&"-"&WEEKNUM(A1)+1&"-"&WEEKNUM(A1)+2&"-"&WEEKNUM(B1),IF(WEEKNUM(B1)-WEEKNUM(A1)>1,WEEKNUM(A1)&"-"&WEEKNUM(A1)+1&"-"&WEEKNUM(B1),WEEKNUM(A1)&"-"&WEEKNUM(B1)))
Last edited by Sam Capricci; 08-22-2018 at 07:42 AM.
Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
Sam Capricci
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks