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?
Come see me in Seattle at ENGAGE 2024! I will be at the 10xViz partner booth throughout as well as the "Lets Talk About Community" Meet & Eat table on Tuesday from 11:45am - 12:45pm!
-
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
- Smartsheet Customer Resources
- 62.9K Get Help
- 376 Global Discussions
- 207 Industry Talk
- 440 Announcements
- 4.5K Ideas & Feature Requests
- 139 Brandfolder
- 129 Just for fun
- 130 Community Job Board
- 449 Show & Tell
- 30 Member Spotlight
- 1 SmartStories
- 284 Events
- 33 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!