Is it possible to show the date in the cells in the format (weeknr) jjjj-mm-dd bij formatting the cells?
With other words can I show the dates in the cells like (01) 2016-01-01 and (05) 2016-02-01 instead of just 2016-01-01 and 2016-02-01 ?
Thanks for your options.
At this moment I use the option
Code:
[COLOR=#CC0000]=WEEKNUM(A1;21)[/color]
in a separate cell but I want to combine the date and weeknumber in one cell.
It doesn't matter if it is converted to a string.
1) The option ="("&WEEKNUM(A1,2)&") "&TEXT(A1,"yyyy-mm-dd") works for me
2) I don't know how to use the option of combo, can you explain a little bit more how to use the function ?
Sorry, this code could be used if you perform conversion with vba.
Do you get #VALUE error as a result or the posted formula? If so, check the contents of the cell wirh general format, you should get a number.
After using any of the above methods to join week number and date, one gets string that is not recognised as date, so it can't be used as date input in formulas.
Hi Combo,
The error in option 1 was caused by a stupidity of my side but it works for me now.
I have worked with vba functions but do I have to loop through all cells using the function to format the cells in the format I like ?
Oh Oh, a little problem...
It seems to be be a problem to convert the dates to text because the conditional formatting of the sheet uses the date cells and there is also a navigation in one of the vba formula's to start the sheet at today's date cell.
So I changed the solution and show the week number of the selected column using a button and a vba procedure.
Thanks for your support.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.