ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Reverting to a date (https://www.excelbanter.com/excel-programming/300648-reverting-date.html)

ronbo

Reverting to a date
 
I am looking for a formula that will use todays date and
revert the cell date to the 1st of last month. i.e.
6/7/2004 would = 5/1/2004.

Thanks for any help.

JWolf

Reverting to a date
 
=DATE(YEAR(NOW()),MONTH(NOW())-1,1)

Ronbo wrote:

I am looking for a formula that will use todays date and
revert the cell date to the 1st of last month. i.e.
6/7/2004 would = 5/1/2004.

Thanks for any help.


Ron Rosenfeld

Reverting to a date
 
On Mon, 7 Jun 2004 09:59:00 -0700, "Ronbo"
wrote:

I am looking for a formula that will use todays date and
revert the cell date to the 1st of last month. i.e.
6/7/2004 would = 5/1/2004.

Thanks for any help.


With a Date in A6,
=A6-DAY(A6)-DAY(A6-DAY(A6))+1

or for today:

=TODAY()-DAY(TODAY())-DAY(TODAY()-DAY(TODAY()))+1


--ron


All times are GMT +1. The time now is 12:11 PM.

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