Count the number of days in a date range that fall in a particular month

  • Hi everyone!

    I am trying to count the number of days in a range that fall in the current month. If Date In is blank then todays date should be used for Date In. I have tried several pretty complicated formulas I found that started with very similar requests but for some reason I cannot adapt them to my sheet. This is a screenshot of the relevant cells is shown below. I also attached a sample spreadsheet. If it helps, a helper cell can be added to store the current Month. Any help would be greatly appreciated.

  • Hi Carim!

    Thanks so much for your help! I made a slight modification because I forgot to mention the start and end dates have to be counted, so for example if the date out is the 1st and the date in is the second, that would be counted as 2 days not one. I also changed I to use a static month because the more I thought about this the more I realized this will be necessary when looking back. Sorry I didn't have that part thought out fully before requesting help.

    I noticed two issues:

    1. The rows that have a Date In filled out are not matching the expected result.

    2. I definitely messed up when trying to adapt this formula to a prior month.



    Thanks again for your help so far and sorry for not having all my thoughts in order before making the original post.

  • Thanks so much Carim! That works perfectly!


    Thanks for your Thanks ... AND for the Like :thumbup:

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Smiley" icon, below, in the bottom right corner :)

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!