ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Date issue (https://www.excelbanter.com/excel-worksheet-functions/215680-date-issue.html)

Patrick C. Simonds

Date issue
 
I need to construct a formula which will subtract 1 month from the previous
month and return the first day of the preceding month.

Example:
A1 value is 24 April, I want A2's value to be 1 March


David Biddulph[_2_]

Date issue
 
Why not =DATE(YEAR(A1),MONTH(A1)-1,1) ?

[That fits your example, but not your description.
From your description, the previous month is March, subtract one month would
give February, and the first day of the preceding month would be 1 January.
If that's what you want, use -3 instead of -1.]
--
David Biddulph

"Patrick C. Simonds" wrote in message
...
I need to construct a formula which will subtract 1 month from the previous
month and return the first day of the preceding month.

Example:
A1 value is 24 April, I want A2's value to be 1 March




Roger Govier[_3_]

Date issue
 
Hi Patrick

Try
=DATE(YEAR(A1),MONTH(A1)-1,1)

--
Regards
Roger Govier

"Patrick C. Simonds" wrote in message
...
I need to construct a formula which will subtract 1 month from the
previous month and return the first day of the preceding month.

Example:
A1 value is 24 April, I want A2's value to be 1 March



T. Valko

Date issue
 
Try this:

=DATE(YEAR(A2),MONTH(A2)-1,1)

--
Biff
Microsoft Excel MVP


"Patrick C. Simonds" wrote in message
...
I need to construct a formula which will subtract 1 month from the previous
month and return the first day of the preceding month.

Example:
A1 value is 24 April, I want A2's value to be 1 March




Michael

Date issue
 
You can also try this:

=EOMONTH(A1,-1)-30
--
If this posting was helpful, please click on the Yes button.
Regards,

Michael Arch.




"Patrick C. Simonds" wrote:

I need to construct a formula which will subtract 1 month from the previous
month and return the first day of the preceding month.

Example:
A1 value is 24 April, I want A2's value to be 1 March



Rick Rothstein

Date issue
 
How about this?

=A1-DAY(A1)-DAY(A1-DAY(A1))+1

--
Rick (MVP - Excel)


"Patrick C. Simonds" wrote in message
...
I need to construct a formula which will subtract 1 month from the previous
month and return the first day of the preceding month.

Example:
A1 value is 24 April, I want A2's value to be 1 March



Shane Devenshire

Date issue
 
Hi,

Try

=EOMONTH(A1,-2)+1

This function requires the ATP in 2003 or earlier - to attach it choose
Tools, Add-ins, and check Analysis ToolPak

--
If this helps, please click the Yes button.

Cheers,
Shane Devenshire

"Patrick C. Simonds" wrote in message
...
I need to construct a formula which will subtract 1 month from the
previous month and return the first day of the preceding month.

Example:
A1 value is 24 April, I want A2's value to be 1 March




All times are GMT +1. The time now is 02:34 PM.

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