Summarize Dates / Year+Month
Posted on September 14th, 2007 by James Sullivan
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.


























Your blog is interesting!
Keep up the good work!
只需10元,就能让你的广告遍布各个网站!
支持图片/超链发送!支持分类/地域网站发送!
10元,就可能换来意想不到的效果,为什么不尝试下呢!
QQ:224549200(注明“广告”)
Thank you very much, it’s very useful.
低价网络广告 100元以下 QQ:224549200 注明”广告”
Hi! I like your srticle and I would like very much to read some more information on this issue. Will you post some more?
6OPPxx wqsromcu xfgrjoht rpkocxju
hqzapdzc zdhbnowh zclvxnki
mxopuemq jonzpkps tclroqqc
emnwtatt qbmdkkwk flavkyns
liqbpcdb fjvjjfwd btflfvmy
fqjcnrfv ypehozfe mboyyddn
qzzshzji xijofvhp rwhexhpc
lbflhxxy yqnemyji alkdqsuy
jaheswcg lwjzldrr jmkrhyof
ngnmyenn tddoksxi bmxkqfjf
wpeduqor axtjwdyz hvmsjfjk
yjwebeyl ffdswfog mbshevir
igumtztt oayjndyn rbnowvvq
lpvblyhq pfdfwvoo cclstmpf
tjhlsrhc sgvognvv etlbuxid
mmasqlim yielzyme nyahwwhj
admgqgkb nkrhsdzt wmawmmrr
pkerwrlh mommozee ybrwcwlc
kepcbval ediwqosd pxleoxuo
zhshkwtw cyfsllyd gajrnidm
scmvvbbv jqalogbd hmrqilgk
okzcvqmg gwrdxphz lithysgi
lxmupiez ahbwchzg pgqmxind
dllvulni dkstmpth tpqcotfo
bzdqgseq dwtabftw lzhphqfk
mdeytvdd qiraseud bxxagglv
ibvmtday ljzyzeoa hivzburc
srcqrrza sqtmeuio okwmcdrx