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: 15

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
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: 11
Upvote 0

Forum statistics

Threads
1,223,868
Messages
6,175,082
Members
452,611
Latest member
bls2024

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