Determining the Amount of days in each month in a week that crosses Months

MDuff

Well-known Member
Joined
Dec 29, 2002
Messages
529
Office Version
  1. 365
Platform
  1. Windows
For example I have data that's stored by weeks but I would like to know what % of that data belongs in a month

So Using a Monday Start for the week of 9/28/2015 I would have 3 days in month 9 and 4 in Month 10

Does n any one have a formula I can run on 9/28/2015 to tell me that 3 days are in September and 4 days are in October?

thanks
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
Let's say you would have the date 9/28/2015 in cell A1:
1. put this formula in B1, which will show the remaining days of that week in September:
Code:
=[COLOR=#ff0000]DAY(DATE(YEAR(A1);MONTH(A1)+1;1)-1)[/COLOR][COLOR=#006400]-DAY(A1)[/COLOR][COLOR=#0000ff]+1[/COLOR]
-this part gives the amount of days in the month of the date in A1 (30), by taking the first day of the next month (march), subtracting one day, and taking the day number of this date(9/30/2015 -> 30)
-subtract the day number of A1 (28)
-we should count Monday as well, therefore +1
2.put this formula in C1, which will show the remaining days of that week in October:
Code:
=7-(DAY(DATE(YEAR(A1);MONTH(A1)+1;1)-1)-DAY(A1)+1)
-subtract the amount of days in the week of September from a week of 7 days
 
Upvote 0

Forum statistics

Threads
1,214,568
Messages
6,120,278
Members
448,953
Latest member
Dutchie_1

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top