EXCEL HELP! How to allocate days within date ranges into weeks of the month

nimishaasir

New Member
Joined
Jun 30, 2022
Messages
1
Office Version
  1. 2011
Hello dear family!

I have been breaking my head over this last few hours. Could do wonders with your help !!

Problem statement:

I have been Given a date range (start date and end date), and now I need to put how many days within those dates - (stay with me) fall under each consecutive week of the month.
I am absolutely struggling with this.

I tried =IF((AND(B5>=M$4, B5<=N$4)),DATEDIF(B5,N$4,"d")+1,"") - to get it to count the number of days from start date to end date of the week, and do that for every week for every date range.

But its a problem if I have to replicate this across rows, and theres a date range which skips a week and starts the next week. I apologise for this excel trifle of a problem.

But please help!

Do you think Array might work ? or VBA? I dont know how to do that..

I have attached a link to the sheet thru google drive (T_T) please helpppp

Loading Google Sheets
 

Attachments

  • Screenshot 2022-06-30 at 22.02.15.png
    Screenshot 2022-06-30 at 22.02.15.png
    104.1 KB · Views: 16

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Try in E5:
Excel Formula:
=SUM(IF(ISOWEEKNUM(ROW(INDIRECT($B5&":"&$C5)))=--RIGHT(E$3,2),1,0))
Then copy to the right and down
 

Attachments

  • DAYS-in-WEEK_Immagine 2022-07-01 113233.jpg
    DAYS-in-WEEK_Immagine 2022-07-01 113233.jpg
    88.9 KB · Views: 12
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,176
Members
453,021
Latest member
Justyna P

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