Automatic Calendar

GhostWatch

New Member
Joined
May 26, 2023
Messages
7
Office Version
  1. 365
Platform
  1. Windows
Im making an automatics calendar where the months are separate and weeks are Monday to Sunday.
I use this to find the weeknumber within the month and it resets for each month.

=ISOWEEKNUM(A364)-ISOWEEKNUM(DATE(YEAR(A364),MONTH(A364),1))+1

However for the end of December it no longer works and gives an error.
Each month is set out as below but as you can see the dates do not carry on until the month end.

1685098195217.png

1685098350612.png







If i use

=WEEKNUM(A364,2)-WEEKNUM(DATE(YEAR(A364),MONTH(A364),1),1)+1


then if the week doesn't start on a Sunday, then it leaves an empty row in the calendar under the days.
How would i go about fixing this?
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
Hi, welcome to the forum!

If I've understood correctly, you could try with this:
Excel Formula:
=INT((A364-WORKDAY.INTL(DATE(YEAR(A364),MONTH(A364),2),-1,"0111111"))/7)+1
 
Upvote 1
Solution

Forum statistics

Threads
1,223,903
Messages
6,175,289
Members
452,631
Latest member
a_potato

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