#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
OCD Cindy
 
Posts: n/a
Default Date calculation

I need a formula to calculate the end date of a monthly term when the start
date is not the 1st of the month. This is to show the proration for the
first month only, so the end date should be the last day of the initital
month/yr. Then when showing the rates for each period, all subsequent
periods would start on the 1st of the month. For example, start date
8/16/06, initial end date needs to be 8/31/06. The current forumla I am
using in Excel XP is:
=IF(G870,(EDATE(C87,G87)+(32-DAY(EDATE(C87,G87)-DAY(EDATE(A1,G87))+32))*MOD(G87,1)-1),"")
where G87 = term (in months or partial mos.)
and C87 is the start date.

This works for all situations EXCEPT when the start date is other than the
1st and the term is less than 1 mo. (decimal).

Any clues???

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Peo Sjoblom
 
Posts: n/a
Default Date calculation

Use EOMONTH instead of EDATE or without the Analysis ToolPak

DATE(YEAR(C87),MONTH(C87)+1,0)

will always give you the last day of the month of the date in C87


--

Regards,

Peo Sjoblom

http://nwexcelsolutions.com



"OCD Cindy" wrote in message
...
I need a formula to calculate the end date of a monthly term when the start
date is not the 1st of the month. This is to show the proration for the
first month only, so the end date should be the last day of the initital
month/yr. Then when showing the rates for each period, all subsequent
periods would start on the 1st of the month. For example, start date
8/16/06, initial end date needs to be 8/31/06. The current forumla I am
using in Excel XP is:
=IF(G870,(EDATE(C87,G87)+(32-DAY(EDATE(C87,G87)-DAY(EDATE(A1,G87))+32))*MOD(G87,1)-1),"")
where G87 = term (in months or partial mos.)
and C87 is the start date.

This works for all situations EXCEPT when the start date is other than the
1st and the term is less than 1 mo. (decimal).

Any clues???



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Duke Carey
 
Posts: n/a
Default Date calculation

See the answer to your earlier post.


Please don't post the same question multiple times.

"OCD Cindy" wrote:

I need a formula to calculate the end date of a monthly term when the start
date is not the 1st of the month. This is to show the proration for the
first month only, so the end date should be the last day of the initital
month/yr. Then when showing the rates for each period, all subsequent
periods would start on the 1st of the month. For example, start date
8/16/06, initial end date needs to be 8/31/06. The current forumla I am
using in Excel XP is:
=IF(G870,(EDATE(C87,G87)+(32-DAY(EDATE(C87,G87)-DAY(EDATE(A1,G87))+32))*MOD(G87,1)-1),"")
where G87 = term (in months or partial mos.)
and C87 is the start date.

This works for all situations EXCEPT when the start date is other than the
1st and the term is less than 1 mo. (decimal).

Any clues???

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
OCD Cindy
 
Posts: n/a
Default Date calculation

sorry for the double post - I was trying to change the subject line... my
comments are all on the Lease Term post.

"Duke Carey" wrote:

See the answer to your earlier post.


Please don't post the same question multiple times.

"OCD Cindy" wrote:

I need a formula to calculate the end date of a monthly term when the start
date is not the 1st of the month. This is to show the proration for the
first month only, so the end date should be the last day of the initital
month/yr. Then when showing the rates for each period, all subsequent
periods would start on the 1st of the month. For example, start date
8/16/06, initial end date needs to be 8/31/06. The current forumla I am
using in Excel XP is:
=IF(G870,(EDATE(C87,G87)+(32-DAY(EDATE(C87,G87)-DAY(EDATE(A1,G87))+32))*MOD(G87,1)-1),"")
where G87 = term (in months or partial mos.)
and C87 is the start date.

This works for all situations EXCEPT when the start date is other than the
1st and the term is less than 1 mo. (decimal).

Any clues???

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
Need help with a date calculation jr100 Excel Discussion (Misc queries) 2 February 8th 06 06:47 PM
Date Calculation to exclude weekends Vim Excel Worksheet Functions 2 January 24th 06 02:58 PM
Calculation based with Range of Date Rao Ratan Singh New Users to Excel 1 January 24th 06 09:05 AM
search for latest date Sue Excel Worksheet Functions 2 August 2nd 05 11:09 PM
Due Date Calculation? Randy New Users to Excel 11 July 14th 05 07:44 PM


All times are GMT +1. The time now is 07:27 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"