Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Trying to get a Boolean formula to work month-to-month | Excel Discussion (Misc queries) | |||
Vlookup formula with a twist | Excel Worksheet Functions | |||
Function or formula to convert "text" month to number of month | Excel Discussion (Misc queries) | |||
Siple formula with a twist | Excel Discussion (Misc queries) | |||
Copy a Formula down with a Twist Q | Excel Worksheet Functions |