COUNTIF Date Next Month

So, I'm trying to create a sheet summary formula that will count the number of milestones in my project schedule that is due next month.

Because I have a section in my project schedule for milestones that is linked to various tasks throughout the project schedule I'm able to use the CHILDREN() function to limit the range. The formula I've been trying to use is:

=COUNTIF(CHILDREN([End Date]3), IF(ISDATE(@cell), AND(IF(MONTH(TODAY()) = 12, 1, MONTH(TODAY()) + 1), YEAR(@cell) = IF(MONTH(TODAY()) = 12, YEAR(TODAY()) + 1, YEAR(TODAY())))))

However, I keep getting an #INVALID DATA TYPE error and I cant figure out why. The formulas I'm using to calculate milestones for last month and the current month work just fine. It's just the milestone for next month that I can't seem to get. I'm sure it's something simple that I'm overlooking, but for the life of me I just can't see it.

Any help at all would be greatly appreciated.

Best Answer

Answers

  • That worked! Thank you very much!!

  • Ramzi K
    Ramzi K ✭✭✭✭✭

    @Troy Hinojosa

    You're very welcome.

    Cheers,

    Ramzi

    Ramzi Khuri - Principal Consultant @ Cedar Tree Consulting (www.cedartreeconsulting.com)

    Feel free to email me: ramzi@cedartreeconsulting.com

    💡 If this post helped you out, please help the Community by marking it as the accepted answer/helpful.

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!