本帖最后由 aoe1981 于 2014-9-30 21:08 编辑
纠结了半天,终于有了答案:
公式如下(143字):
- =TEXT(DATE(2013,RIGHT(MAX(SUMIFS(C2:C400,B2:B400,"<"&DATE(2013,ROW(2:25),1),B2:B400,">="&DATE(2013,ROW(1:24),1))+ROW(1:24)/100),2),1),"yyy年m月")
复制代码 附件如下:
计算单月销售金额最高的月份(aoe1981).rar
(16.4 KB, 下载次数: 1)
这个131字,思路同上:
- =TEXT(DATE(2013,RIGHT(MAX(SUMIFS(C:C,B:B,"<"&DATE(2013,ROW(2:25),1),B:B,">="&DATE(2013,ROW(1:24),1))+ROW(1:24)/100),2),1),"yyy年m月")
复制代码
下面03版可用,140字:
- =TEXT(DATE(2013,RIGHT(MAX(SUMIF(B:B,"<"&DATE(2013,ROW(2:25),1),C:C)-SUMIF(B:B,"<"&DATE(2013,ROW(1:24),1),C:C)+ROW(1:24)/100),2),1),"yyy年m月")
复制代码 再进一步128字,03版可类似修改(略):
- =TEXT(DATE(2013,RIGHT(MAX(SUMIFS(C:C,B:B,"<="&DATE(2013,ROW(2:25),),B:B,">"&DATE(2013,ROW(1:24),))+ROW(2:25)/100),2),),"yyy年m月")
复制代码
|