Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 23
Default formula for last day of month with a twist

I need a formula that calculates the last day of the month, but if the date
falls on the last day of the month I need it to return the last day of the
next month.

If A1=5/1/07, i need 5/31/07
If A1=5/31/07, i need 6/30/07

Many thanks.


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,440
Default formula for last day of month with a twist

=EOMONTH(A1,IF(EOMONTH(A1,0)=A1,1,0))

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"MelB" wrote in message ...
|I need a formula that calculates the last day of the month, but if the date
| falls on the last day of the month I need it to return the last day of the
| next month.
|
| If A1=5/1/07, i need 5/31/07
| If A1=5/31/07, i need 6/30/07
|
| Many thanks.
|
|


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 347
Default formula for last day of month with a twist

Hi,

Try this:

=IF(A1=EOMONTH(A1,0),EOMONTH(A1,1),EOMONTH(A1,0))

Regards!
Jean-Guy

"MelB" wrote:

I need a formula that calculates the last day of the month, but if the date
falls on the last day of the month I need it to return the last day of the
next month.

If A1=5/1/07, i need 5/31/07
If A1=5/31/07, i need 6/30/07

Many thanks.


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,718
Default formula for last day of month with a twist

Try this:

=EOMONTH(A1+1,0)


"MelB" wrote:

I need a formula that calculates the last day of the month, but if the date
falls on the last day of the month I need it to return the last day of the
next month.

If A1=5/1/07, i need 5/31/07
If A1=5/31/07, i need 6/30/07

Many thanks.


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 347
Default formula for last day of month with a twist

Perfect!!

Cheers!
Jean-Guy

"Teethless mama" wrote:

Try this:

=EOMONTH(A1+1,0)


"MelB" wrote:

I need a formula that calculates the last day of the month, but if the date
falls on the last day of the month I need it to return the last day of the
next month.

If A1=5/1/07, i need 5/31/07
If A1=5/31/07, i need 6/30/07

Many thanks.




  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,651
Default formula for last day of month with a twist

On Sat, 1 Dec 2007 08:10:01 -0800, MelB wrote:

I need a formula that calculates the last day of the month, but if the date
falls on the last day of the month I need it to return the last day of the
next month.

If A1=5/1/07, i need 5/31/07
If A1=5/31/07, i need 6/30/07

Many thanks.


And, without the Analysis Tool Pak installed:

=A1+33-DAY(A1+1)-DAY(A1+33-DAY(A1+1))
--ron
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
Trying to get a Boolean formula to work month-to-month mstieler Excel Discussion (Misc queries) 4 July 18th 07 10:12 PM
Vlookup formula with a twist Bill_S Excel Worksheet Functions 2 October 13th 06 05:12 PM
Function or formula to convert "text" month to number of month Steve Vincent Excel Discussion (Misc queries) 1 February 4th 06 04:19 PM
Siple formula with a twist Mike Busch Excel Discussion (Misc queries) 1 August 30th 05 05:06 PM
Copy a Formula down with a Twist Q John Excel Worksheet Functions 7 November 23rd 04 10:03 PM


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

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

About Us

"It's about Microsoft Excel"