Count if function on dates
Hi,
Can someone help me how to use count if to calculate the no of days that an event happens in a month and create a monthly report based on that?
Best Answer
-
Try something like this. (change the last number, so it represents the corresponding month that you want to count) I'd also recommend adding a so-called helper column with the month numbers already added, and then you could use my second formula instead.)
= COUNTIFS([Project Completion Date]:[Project Completion Date], IFERROR(MONTH(@cell), 0) = 1)
= COUNTIFS([Project Completion Date]:[Project Completion Date], IFERROR(MONTH(@cell), 0) = [Month Numbers]@row)
Did that work?
✅Remember! Did my post(s) help or answer your question or solve your problem? Please support the Community by marking it Insightful/Vote Up or/and as the accepted answer. It will make it easier for others to find a solution or help to answer!
SMARTSHEET EXPERT CONSULTANT & PARTNER
Andrée Starå | Workflow Consultant / CEO @ WORK BOLD
W: www.workbold.com | E:andree@workbold.com | P: +46 (0) - 72 - 510 99 35
Feel free to contact me for help with Smartsheet, integrations, general workflow advice, or anything else.
Answers
-
Would it span more than 1 month?
-
Hi @Praz
I hope you're well and safe!
Do you only need to know the number of days between two dates?
I hope that helps!
Be safe and have a fantastic week!
Best,
Andrée Starå | Workflow Consultant / CEO @ WORK BOLD
✅Did my post(s) help or answer your question or solve your problem? Please support the Community by marking it Insightful/Vote Up or/and as the accepted answer. It will make it easier for others to find a solution or help to answer!
SMARTSHEET EXPERT CONSULTANT & PARTNER
Andrée Starå | Workflow Consultant / CEO @ WORK BOLD
W: www.workbold.com | E:andree@workbold.com | P: +46 (0) - 72 - 510 99 35
Feel free to contact me for help with Smartsheet, integrations, general workflow advice, or anything else.
-
No Paul. I have multiple dates in a column all over the year and I need to count and sort it based on months.
-
Hi Andre,
Thanks for your comments. Actually I need to count how many days that occurrence fall in a month. i have a list of dates in a column and I need to count and sort based on the months.
-
Hi @Praz ,
Could you send a photo of an example of the data to assist in understanding your problem?
Cheers
Gareth
-
Try something like this. (change the last number, so it represents the corresponding month that you want to count) I'd also recommend adding a so-called helper column with the month numbers already added, and then you could use my second formula instead.)
= COUNTIFS([Project Completion Date]:[Project Completion Date], IFERROR(MONTH(@cell), 0) = 1)
= COUNTIFS([Project Completion Date]:[Project Completion Date], IFERROR(MONTH(@cell), 0) = [Month Numbers]@row)
Did that work?
✅Remember! Did my post(s) help or answer your question or solve your problem? Please support the Community by marking it Insightful/Vote Up or/and as the accepted answer. It will make it easier for others to find a solution or help to answer!
SMARTSHEET EXPERT CONSULTANT & PARTNER
Andrée Starå | Workflow Consultant / CEO @ WORK BOLD
W: www.workbold.com | E:andree@workbold.com | P: +46 (0) - 72 - 510 99 35
Feel free to contact me for help with Smartsheet, integrations, general workflow advice, or anything else.
-
Got it Andree... It really worked. Thanks a ton
-
SMARTSHEET EXPERT CONSULTANT & PARTNER
Andrée Starå | Workflow Consultant / CEO @ WORK BOLD
W: www.workbold.com | E:andree@workbold.com | P: +46 (0) - 72 - 510 99 35
Feel free to contact me for help with Smartsheet, integrations, general workflow advice, or anything else.
-
HI @Praz,
Another option to @Andrée Starå is:
Have a month helper column:
=MONTH([Project Completion Date]@row)
In sheet Summary:
=COUNTIF([Month Helper]:[Month Helper], 1) - Do this for Jnauary and then so on changing the number.ni
Then use a report based on summary.
Cheers,
Gareth
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.9K Get Help
- 441 Global Discussions
- 140 Industry Talk
- 472 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 496 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!