Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Prorating calculations in Excel

After spending much time trying to find a nice way to calculate a decimal
value for number of months for use in protrating calculations I've come up
with this fairly simple and short way. Compared to what I've seen on the net
this seems quite simple, as long as you have the extra excell plugin added
to get the extra functions (if needed).

so...

IF a date is in CELL C2 and the end date is "31/03/04" as seen in formula...
DATEDIF(C2,"31/03/04","M")+(DATEDIF(C2,EOMONTH(C2,0),"D")+1)/TEXT(EOMONTH(C2
,0),"DD")

DATEDIF(C2,"31/03/04","M") ,,,,is the # of full months to date (im
assuming an end of month date)
DATEDIF( C2,EOMONTH(C2,0),"D" ) + 1 ,,, is the # of days let in the month
+1 since I want to count the starting day.
TEXT(EOMONTH(C2,0), "DD") ,,,, is a quick way of getting the total number
of days in the start month.
Using CEILING( BLABLABLA, 0.01) you can get some rounding the way you
want...

EOMONTH() may require a plugin added from the plugin menu of excel.

[A LONG example with error checking]

=IF( ISERROR( CEILING(
DATEDIF(C2,"31/03/04","M")+(DATEDIF(C2,EOMONTH(C2,0),"D")+1)/TEXT(EOMONTH(C2
,0),"DD"), 0.01) ), "???", CEILING(
DATEDIF(C2,"31/03/04","M")+(DATEDIF(C2,EOMONTH(C2,0),"D")+1)/TEXT(EOMONTH(C2
,0),"DD"), 0.01) )


---bla
email: [danielm at citenet dot net ]dot why are you reading this?




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
Help with calculations in Excel Joel Excel Discussion (Misc queries) 14 December 14th 09 01:57 AM
DEG MIN SEC CALCULATIONS IN EXCEL. HARSHAWARDHAN. S .SHASTRI[_2_] Excel Worksheet Functions 0 March 8th 07 07:37 PM
calculations in excel carmen Excel Discussion (Misc queries) 1 July 24th 06 02:53 AM
calculations in MS excel MiniReefKeeper Excel Worksheet Functions 4 July 4th 06 01:57 AM
calculations in excel Mark C Excel Worksheet Functions 6 November 17th 05 12:30 PM


All times are GMT +1. The time now is 05:05 AM.

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"