ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Dates problem (https://www.excelbanter.com/excel-discussion-misc-queries/214809-dates-problem.html)

Andrew Mackenzie

Dates problem
 
Hi All,

In cell A1 I have, say, 30-Nov-08. In cell B1 I want a formula to return
the last day of the last month end i.e. 31-Oct-08. In cell C1 I want a
similar formula to return the last day of the last qaurter end i.e.
30-Sep-08. In cell D1 I want a formula to return the last day of the last
year end i.e. 31-Dec-2007.

Can anyone help?

Many thanks in advance,

KR
Andrew



David Biddulph[_2_]

Dates problem
 
=DATE(YEAR(A1),MONTH(A1),0)
=DATE(YEAR(A1),3*INT((MONTH(A1)-1)/3)+1,0)
=DATE(YEAR(A1),1,0)
--
David Biddulph

"Andrew Mackenzie" wrote in message
...
Hi All,

In cell A1 I have, say, 30-Nov-08. In cell B1 I want a formula to return
the last day of the last month end i.e. 31-Oct-08. In cell C1 I want a
similar formula to return the last day of the last qaurter end i.e.
30-Sep-08. In cell D1 I want a formula to return the last day of the last
year end i.e. 31-Dec-2007.

Can anyone help?

Many thanks in advance,

KR
Andrew





Andrew Mackenzie

Dates problem
 
Brilliant David, Thanks very much for your help.

KR
Andrew

"David Biddulph" <groups [at] biddulph.org.uk wrote in message
...
=DATE(YEAR(A1),MONTH(A1),0)
=DATE(YEAR(A1),3*INT((MONTH(A1)-1)/3)+1,0)
=DATE(YEAR(A1),1,0)
--
David Biddulph

"Andrew Mackenzie" wrote in message
...
Hi All,

In cell A1 I have, say, 30-Nov-08. In cell B1 I want a formula to

return
the last day of the last month end i.e. 31-Oct-08. In cell C1 I want a
similar formula to return the last day of the last qaurter end i.e.
30-Sep-08. In cell D1 I want a formula to return the last day of the

last
year end i.e. 31-Dec-2007.

Can anyone help?

Many thanks in advance,

KR
Andrew








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

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