Date custom formatting for 30 days in each month

hidaren

New Member
Joined
Oct 25, 2022
Messages
7
Office Version
  1. 2021
Platform
  1. Windows
Hey guys,

My government considers 30 days for each months when it comes to payments (ignores the 31th days of some months) which proved problematic for me to make some calculations regarding the salary of the workers, I need to know if there's a way to create a custom calendar system or modify the existing ones to make a year in which all months are 30 days, or if there's a way to exclude certain days (31th day of each month) from =datedif function, or something like that.
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
I don't know your data structure but you can use something inside DATEIF function:

Excel Formula:
=DATEDIF(Start_Date,IF(DAY(End_Date)>30,DATE(YEAR(End_Date),MONTH(End_Date),30),End_Date),"Y")
 
Upvote 0
I don't know your data structure but you can use something inside DATEIF function:

Excel Formula:
=DATEDIF(Start_Date,IF(DAY(End_Date)>30,DATE(YEAR(End_Date),MONTH(End_Date),30),End_Date),"Y")
Well, every female employee who gives birth to a new baby, will be paid an extra monthly salary until her baby reaches 6 years old, yet, there are some conditions:
1. every month should be considered as precisely 30 days, even if the month is 31 days in reality, still 30 days should be counted.
2. the 3 months of summer must be excluded if the employee is a teacher since they don't go to work during this period.
and some other conditions which are not of concern here

I've already made a series of formulas using a series of cells that meets the needs of other conditions yet, still, there's a flaw in the procedure which can only be solved by a calendar in which months are exactly 30 days. I want to know if there's a way to make such a calendar or modify the existing ones in the "format cell" tab to make this possible?
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,240
Members
452,621
Latest member
Laura_PinksBTHFT

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