No. I need it to determine it by month. So it would need to return "17" for October, "30" for November, "31" for December, and "13" for January. (Correction to my original submission, since the date range begins on October 15th, there are actually 17 days in October that are within the date range - Oct 15 thru 31st.)
To provide a little more background, I manage the dollars spent on many different maintenance projects for my company. If a project costs $1 million dollars, instead of the full $1 million being deducted from the budget at the time the project begins, the funds are spread out over the entire length of the project (which is the date range). That date range could be 30 days or 450 days, depending on the project. The dollars "accrue" monthly based on a daily rate. That daily rate is simply determined by dividing the cost of the project by the number of days in the date range. ($1 million dollar project over 75 days, the daily accrual is $1,000,000/74 = $13,513.
My spreadsheet needs to reflect the accrued amount by month (so we can see the monthly effect to the bottom line). Currently, for each project, I have to determine what the daily accrual amount is, and for each month, mutliply that number by the number of days in the month that fall in the date range. This has to be done for thousands of projects. If I could determine a formula do to this automatically, it would save a LOT of time.
If I could at least have a formula to determine the # of days in each month that fall in the date range (separated by month), I can embed that formula and have a formula that references that number to multiply by the daily accrual amount.
Please let me know if you have any more questions. I'm excited at the prospect of making this work!
Thanks again,
Will