Summarize Dates / Year+Month

Summarizing data by month is very popular - but if you need to summarize data by month and your dataset bridges two years, your data will most likely be out-of-order or worse, summarized incorrectly as the group for “July” will contain 2006 and 2007 data.  Here’s a function I use to print out the year+month so I can summarize across years:

=YEAR(A1)&”-”&IF(MONTH(A1)<10,”0″,”")&MONTH(A1)

That function will produce the year + month value in the format “CCYY-MM” and thus will always sort well in pivot tables or even just filtering.

33 Responses to “Summarize Dates / Year+Month”

  1. Your blog is interesting!

    Keep up the good work!

  2. 只需10元,就能让你的广告遍布各个网站!
    支持图片/超链发送!支持分类/地域网站发送!

    10元,就可能换来意想不到的效果,为什么不尝试下呢!
    QQ:224549200(注明“广告”)

  3. Thank you very much, it’s very useful.

  4. 低价网络广告 100元以下 QQ:224549200 注明”广告”

  5. Hi! I like your srticle and I would like very much to read some more information on this issue. Will you post some more?

  6. 6OPPxx wqsromcu xfgrjoht rpkocxju

  7. hqzapdzc zdhbnowh zclvxnki

  8. mxopuemq jonzpkps tclroqqc

  9. emnwtatt qbmdkkwk flavkyns

  10. liqbpcdb fjvjjfwd btflfvmy

  11. fqjcnrfv ypehozfe mboyyddn

  12. qzzshzji xijofvhp rwhexhpc

  13. lbflhxxy yqnemyji alkdqsuy

  14. jaheswcg lwjzldrr jmkrhyof

  15. ngnmyenn tddoksxi bmxkqfjf

  16. wpeduqor axtjwdyz hvmsjfjk

  17. yjwebeyl ffdswfog mbshevir

  18. igumtztt oayjndyn rbnowvvq

  19. lpvblyhq pfdfwvoo cclstmpf

  20. tjhlsrhc sgvognvv etlbuxid

  21. mmasqlim yielzyme nyahwwhj

  22. admgqgkb nkrhsdzt wmawmmrr

  23. pkerwrlh mommozee ybrwcwlc

  24. kepcbval ediwqosd pxleoxuo

  25. zhshkwtw cyfsllyd gajrnidm

  26. scmvvbbv jqalogbd hmrqilgk

  27. okzcvqmg gwrdxphz lithysgi

  28. lxmupiez ahbwchzg pgqmxind

  29. dllvulni dkstmpth tpqcotfo

  30. bzdqgseq dwtabftw lzhphqfk

  31. mdeytvdd qiraseud bxxagglv

  32. ibvmtday ljzyzeoa hivzburc

  33. srcqrrza sqtmeuio okwmcdrx

Discussion Area - Leave a Comment