Hey,
I have alot of excel export data (in red in example).
There are names and name of the months (in Norwegian - should be close enough to English).
I need to convert the red data into a table like the green box.
Hey,
I have alot of excel export data (in red in example).
There are names and name of the months (in Norwegian - should be close enough to English).
I need to convert the red data into a table like the green box.
In E2
=DATE(2016,MONTH(INDEX($B$2:$B$80,MATCH($D12,$A$2:$A$80,0))&0),1)
in F2
=DATE(2016,MONTH(INDEX($B$2:$B$80,MATCH($D12,$A$2:$A$80,0)+COUNTIF($A$2:$A$80,D12)-1)&0),1)
How do we know the year or finish day: you have 01 and 31 but no explanation as to why.
Hi,
Why is the end date for Carl 1/12/2016, but for Lisa it's 31/12/2016. They both have Desember as the last month.
And why 2016? Is that the default year?
Richard Buttrey
RIP - d. 06/10/2022
If any of the responses have helped then please consider rating them by clicking the small star icon below the post.
you can do that with PowerQuery, see attached file
(you need to use Norwegian instead of English months - this is the pattern only, my result is not correct)
Last edited by sandy666; 11-20-2017 at 11:30 AM.
Is your Excel version English or Norwegian?
If Norwegian you can just use helper column.
=DATE(2016,MONTH(DATEVALUE(B2&" 1")),1)
Which will convert month name to date value for 1st day of the month.
If your Excel version is English... try creating Lookup table to convert month name.
See attached.
?Progress isn't made by early risers. It's made by lazy men trying to find easier ways to do something.?
― Robert A. Heinlein
Or my suggestion...
Glenn
None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU
Here is localized version without changing norwegian to english & vice versa
Norwegian (Nynorsk) is used not Norwegian (Bokmal)
(PowerQuery)
Last edited by sandy666; 11-20-2017 at 11:51 AM.
Thanks everybody!
I think JohnTopleys code solves the problem.
I did wrong with the 1st and 31st. dates... there was no way to know.
you are welcome, thanks for the feedback
(btw. version from post #7 is correct for you if you planning to use PowerQuery)
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks