Date issue

  • Thread starter Patrick C. Simonds
  • Start date
P

Patrick C. Simonds

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
 
D

David Biddulph

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.]
 
S

Shane Devenshire

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
 
Top