Round Date to Nearest January

chet645

Board Regular
Joined
Nov 10, 2010
Messages
67
Office Version
  1. 365
Platform
  1. Windows
Hello Everyone,

I am wondering how to use a dynamic formula that rounds a given date to the nearest January month. For example, If I have two dates that I want to round (3/31/2020 and 10/31/2020), the formula would calculate the fist date as 1/31/2020 and the second date to 1/31/2021.

Your help is much appreciated.

Chet
 
Slightly Shorter than post 6

=DATE(IF((I7-DATE(YEAR(I7),1,1))>=(DATE(YEAR(I7)+1,1,1)-I7),YEAR(I7)+1,YEAR(I7)),1,DAY(I7))
 
Upvote 0

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
Thanks All, for the speedy response. It is much appreciated. I love the conciseness of Fluff's formula. I ultimately wrapped that formula in an EOMONTH function because my model uses end of month convention.

Thanks again!!
 
Upvote 0
Glad we could help & thanks for the feedback.
To get the month end, you can just swap edate for eomonth
=EOMONTH(I7,IF(MONTH(I7)<7,1,13)-MONTH(I7))
 
Upvote 0
Here is another formula that you can consider...

=DATE(YEAR(G2)+(G2>DATE(YEAR(G2),6,30)),1,31)
 
Upvote 0
Here is another formula that you can consider...

=DATE(YEAR(G2)+(G2>DATE(YEAR(G2),6,30)),1,31)
Actually, we can shorten this a little (using a variation on the idea Fluff posted in Message #13)...

=DATE(YEAR(A183)+(MONTH(A183)>6),1,31)
 
Upvote 0

Forum statistics

Threads
1,214,542
Messages
6,120,116
Members
448,945
Latest member
Vmanchoppy

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