ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Round to nearest month (https://www.excelbanter.com/excel-programming/397849-round-nearest-month.html)

JP

Round to nearest month
 
Hi all. I need a function that can take a date, no matter what date in that
month, and round to the first of the next month.

So for example if the cell has 1/4/07 I want the result to say 2/1/07
Or 1/1/07 would return 2/1/07

Thanks!

Jp

Niek Otten

Round to nearest month
 
=DATE(YEAR(A1),MONTH(A1)+1,1)

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"Jp" wrote in message ...
| Hi all. I need a function that can take a date, no matter what date in that
| month, and round to the first of the next month.
|
| So for example if the cell has 1/4/07 I want the result to say 2/1/07
| Or 1/1/07 would return 2/1/07
|
| Thanks!
|
| Jp




All times are GMT +1. The time now is 11:09 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com