Count the days in a 7-day period in a given month

ThatExcelLife

New Member
Joined
Nov 2, 2017
Messages
18
Hi Team!

I am banging my head against a wall on this excel issue. Please see below. What I have on the top row is the start of a new week (i.e. 30-Apr-2022 means the 7 day period that starts on 30-Apr-2022 and ends on 6-May-2022). what I am attempting to do is have a formula that will return 6 days in cell C2, as in there are 6 days in the 7 day period starting 30-Apr-2022 in the month of May (cell A2). in cell G2, the formula should return 4 days, as in there are 4 days in the month of May between 28-May-2022 and 6-June-2022. Any week that is complete in the month of May should be 7.

The idea is to drag the formula down to calculate the same for June, July, and so on.

It seems simple but I am crossing wires such that I cannot get to a perfect 31 days for May or 30 days for June.

Further, I do not want to use DATEDIF as a function since its not the standard function and when I share the sheet, it might crash on another's excel.

Any help would be appreciated!


23-Apr-202230-Apr-20227-May-202214-May-202221-May-202228-May-20224-June-202211-June-2022
May 202206777400
June 20220000047
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.

ERIC: I have spend over 2 HOURS trynna solve this from all sorts of angles and you destroy the problem in minutes! Wow I was making it way more complicated then it needed to be. HUGE thanks to you and your excel wizard abilities :) You saved me time and stress! Really appreciate your quick response too.

Cheers to Eric for helping me out in a big way!
 
Upvote 0

Forum statistics

Threads
1,214,912
Messages
6,122,200
Members
449,072
Latest member
DW Draft

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