Nov 15 2022 08:57 AM
I am sorry to ask but I have not found a clear answer to this concrete case.
I simply have a table... in my case I have dates eg 2022-10-01, 2022-11-01, 2022,-10-02, 2022-09-01, 2022-10-04 ---- and I called this Table1
I simply want to count the number of entries eg in October i.e something like
=countif(Table1, month(Table1[@])=10)
But
1) the formula above returns 0... although if I use it =MONTH(Table1[@]) in a separate column it will bring the correct result (and then I calculate sumif on this column )
2) a formula like =COUNTIF(Table4,MONTH(Table4[Column1])=10) expands the value zero to rows below....
Any hint please how I can use it?
TIA!
Nov 15 2022 10:01 AM
SolutionWith the following formula you get your desired result:
=SUM(--(MONTH(Table1[Date])=10))
Please adjust table name and column header.
Nov 15 2022 10:38 AM
Nov 15 2022 10:52 AM
as an add on - why doesn’t the criteria work on the countifs?
seems the criteria can’t evaluate expressions - just make simple comparisons….
is this a limitation of my version or is it excell?
thanks!
Nov 15 2022 01:04 PM
The criteria argument of COUNTIF must be something like ">0" or "January" or $B$2, not an expression that evaluates a range.
Nov 15 2022 10:01 AM
SolutionWith the following formula you get your desired result:
=SUM(--(MONTH(Table1[Date])=10))
Please adjust table name and column header.