Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Matt D Francis
 
Posts: n/a
Default Calculate month-end date from date in adjacent cell?

Hi,

I need to be able to enter a date in a cell and have the cell next to it
return the corresponding month-end date. I'm sure it's simple but I couldn't
find a dedicated function.

e.g

A1 = 03/01/2005
A2 = 31/03/2005 (calculated)

or

A1 = 17/021/2005
A2 = 28/02/2005 (calculated)

etc
  #2   Report Post  
JE McGimpsey
 
Posts: n/a
Default

One way:

To XL, the 0th day of the month is the last day of the previous month,
so:

A2: =DATE(YEAR(A1),MONTH(A1)+1,0)

You could also use the Analysis ToolPak Addin's EOMONTH() function:

A2: =EOMONTH(A1, 0)

but any users of the sheet will have to have the ATP installed.



In article ,
"Matt D Francis" wrote:

Hi,

I need to be able to enter a date in a cell and have the cell next to it
return the corresponding month-end date. I'm sure it's simple but I couldn't
find a dedicated function.

e.g

A1 = 03/01/2005
A2 = 31/03/2005 (calculated)

or

A1 = 17/021/2005
A2 = 28/02/2005 (calculated)

etc

  #3   Report Post  
Mangesh
 
Posts: n/a
Default

use:

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

- Mangesh



"Matt D Francis" wrote in message
...
Hi,

I need to be able to enter a date in a cell and have the cell next to it
return the corresponding month-end date. I'm sure it's simple but I

couldn't
find a dedicated function.

e.g

A1 = 03/01/2005
A2 = 31/03/2005 (calculated)

or

A1 = 17/021/2005
A2 = 28/02/2005 (calculated)

etc



  #4   Report Post  
Matt D Francis
 
Posts: n/a
Default

cheers, just found the EOMONTH function - should be OK to use, thanks for the
speedy resonse!

Matt

"JE McGimpsey" wrote:

One way:

To XL, the 0th day of the month is the last day of the previous month,
so:

A2: =DATE(YEAR(A1),MONTH(A1)+1,0)

You could also use the Analysis ToolPak Addin's EOMONTH() function:

A2: =EOMONTH(A1, 0)

but any users of the sheet will have to have the ATP installed.



In article ,
"Matt D Francis" wrote:

Hi,

I need to be able to enter a date in a cell and have the cell next to it
return the corresponding month-end date. I'm sure it's simple but I couldn't
find a dedicated function.

e.g

A1 = 03/01/2005
A2 = 31/03/2005 (calculated)

or

A1 = 17/021/2005
A2 = 28/02/2005 (calculated)

etc


  #5   Report Post  
Mangesh
 
Posts: n/a
Default

You need to have the Addin Analysis ToolPak enabled to use the EOMONTH and
hence that function was not advised in the first place.

- Mangesh


"Matt D Francis" wrote in message
...
cheers, just found the EOMONTH function - should be OK to use, thanks for

the
speedy resonse!

Matt

"JE McGimpsey" wrote:

One way:

To XL, the 0th day of the month is the last day of the previous month,
so:

A2: =DATE(YEAR(A1),MONTH(A1)+1,0)

You could also use the Analysis ToolPak Addin's EOMONTH() function:

A2: =EOMONTH(A1, 0)

but any users of the sheet will have to have the ATP installed.



In article ,
"Matt D Francis" wrote:

Hi,

I need to be able to enter a date in a cell and have the cell next to

it
return the corresponding month-end date. I'm sure it's simple but I

couldn't
find a dedicated function.

e.g

A1 = 03/01/2005
A2 = 31/03/2005 (calculated)

or

A1 = 17/021/2005
A2 = 28/02/2005 (calculated)

etc




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I automatically calculate YTD numbers by changing a date? MDSistah Excel Worksheet Functions 1 April 29th 05 05:52 PM
Lookup the month in a date string 01/03/05 Una Excel Worksheet Functions 1 March 30th 05 09:45 AM
Month Year Date Format Jamie Excel Worksheet Functions 2 February 7th 05 06:43 PM
Excel: Is there a way to calculate the date as week of month? debra adams Excel Discussion (Misc queries) 2 January 3rd 05 09:39 PM
calculate weeks from a start date ( not yr weeks) Todd F. Excel Worksheet Functions 6 November 27th 04 05:53 PM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"