当前月份的计数日期值 - MS Excel [英] Count Date Values of Current Month - MS Excel
本文介绍了当前月份的计数日期值 - MS Excel的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
1/1/2012 8:50
1/1/2012 8:45
1/1/2012 8:55
1/1/2012 8:59
1/1/2012 8:12
3/1/2012 8:30
1/1/2012 9:50
2/1/2012 10:00
现在,我想从A列得到一个具有当前月的日期值的单元格数。
我想到了以下公式,但我怀疑它将仅在具有mm-dd-yyyy作为系统日期格式的机器中工作。
= COUNTIFS(A:A, > = &安培; DATEVALUE(MONTH(TODAY())及 - 1 &安培; - &安培; YEAR(TODAY()))中,A:A, < & DATEVALUE(MONTH(TODAY())+ 1& - 1& - &YEAR(TODAY())))
任何解决方法/技巧?
解决方案
您可以在当月使用COUNTIFS像这样
= COUNTIFS(A:A,> =& EOMONTH(TODAY(), - 1)+ 1,A :A,&EOMONTH(TODAY(),0)+1)
I have following date values (with time) in Column A.
1/1/2012 8:50
1/1/2012 8:45
1/1/2012 8:55
1/1/2012 8:59
1/1/2012 8:12
3/1/2012 8:30
1/1/2012 9:50
2/1/2012 10:00
Now, I want to get a count of cells from Column A having date values of current Month.
I have thought of following formula, but I suspect it will work only in machines having mm-dd-yyyy as System-Date-Format.
=COUNTIFS(A:A,">="&DATEVALUE(MONTH(TODAY())&"-1"&"-"&YEAR(TODAY())),A:A,"<"&DATEVALUE(MONTH(TODAY())+1&"-1"&"-"&YEAR(TODAY())))
Any workaround/trick for this?
解决方案
You can use COUNTIFS for current month like this
=COUNTIFS(A:A,">="&EOMONTH(TODAY(),-1)+1,A:A,"<"&EOMONTH(TODAY(),0)+1)
这篇关于当前月份的计数日期值 - MS Excel的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文