Hi!
Is it possible to convert for example 200801 to a specific date?
Examples:
200801 to become 31/12/2007
200802 to become 07/01/2008
200805 to become 28/01/2008
200810 to become 03/03/2008
Hi!
Is it possible to convert for example 200801 to a specific date?
Examples:
200801 to become 31/12/2007
200802 to become 07/01/2008
200805 to become 28/01/2008
200810 to become 03/03/2008
assuming your values are in A1:A4 would the following work for you:
B1: =DATE(LEFT(A1,4),1,1)+((RIGHT(A1,2)-1)*7)+(1-(WEEKDAY(DATE(LEFT(A1,4),1,1),2)))
My Recommended Reading:
Volatility
Sumproduct & Arrays
Pivot Intro
Email from XL - VBA & Outlook VBA
Function Dictionary & Function Translations
Dynamic Named Ranges
i think you can shorten that to
=DATE(LEFT(A1,4),1,1)+RIGHT(A1,2)*7-8
This seems to work and is shorter than the Donkey's
=DATE(LEFT(A1,4)+0,1,(RIGHT(A1,2)-1)*7)
or this:
="31/12/2007"+(RIGHT(A1,2)-1)*7
Richard Schollar
Microsoft MVP - Excel
Yes assuming of course you're only looking at 2008 the one I posted should work with any year week combination assuming OP first date to be returned should be the Monday of the week in which 1st of year appears.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks