Countif function within a specific month, what is my error
Hello all,
I'm beginning with the functions and I'm struggling here with this instance:
My objective is to add a chart to a dashboard, my information table is as follow, Basically I want to count the number of request per month and include them in a bar chart.
So, I made a calcsheet to extract the information to generate the chart.
I want to count the number of request made in november
So here is the formula I'm trying and on the following row, the error I get:
=COUNTIF({Date de la demande};(Month(@CELL) = 11)
Please let me know what I'm missing?
Thanking you in advance,
Chris
Best Answers
-
@Brewso That leads me to believe you may have blanks or other non-date values within the date column. In that case you will need to work in an IFERROR like so:
=COUNTIF({Date de la demande}; IFERROR(MONTH(@cell), 0) = 11)
-
@Brewso Happy to help. 👍️
@Ray Lindstrom Some regions use semicolons in place of commas and commas in place of periods.
Answers
-
-
"@cell" is case sensitive. It must be all lowercase.
-
Paul, thanks for the info.
It helped a bit but didn't solve it, I now have a different alert :
=COUNTIF({Date de la demande}; (MONTH(@cell)=11))
#INVALID DATA TYPE
-
@Brewso That leads me to believe you may have blanks or other non-date values within the date column. In that case you will need to work in an IFERROR like so:
=COUNTIF({Date de la demande}; IFERROR(MONTH(@cell), 0) = 11)
-
I agree with @Paul Newcome, but with the change of the semicolon to a comma.
=COUNTIF({Date de la demande}, IFERROR(MONTH(@cell), 0) = 11)
Hope this helps!
BRgds,
-Ray
-
Thanks a lot Paul and Ray,
It's working, I used a new table and start the data at the top of the columns which is working fine, then I went back to my original calcsheet and re-selected my range and now it works on both pages.
The function works with the semicolon but not with the comma.
-
@Brewso Happy to help. 👍️
@Ray Lindstrom Some regions use semicolons in place of commas and commas in place of periods.
-
Thanks for letting me know that about the regions having different formats (comma vs semi)! I was wondering how in the world a semicolon worked for one user, but failed in my testing before making my recommendation. Now I get it!
Appreciate you taking the time to let me know. 😊
-
@Ray Lindstrom No worries. I have to be very careful when I come across that because I am so used to using commas that I will put them in out of habit and then miss that as a problem when it doesn't work for someone. Haha
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.4K Get Help
- 424 Global Discussions
- 221 Industry Talk
- 465 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 145 Just for fun
- 62 Community Job Board
- 463 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 301 Events
- 39 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!