Excel - Date formula

cboozer811

New Member
Joined
Jan 24, 2010
Messages
25
I need to calculate between dates and apply to dollar amount (pro-rate)

This one is correct

4-1-2011 to 4-30-2011 = 30 days - apply to $44,000
J5 K5 =(K5-J5+1)/365)
L5 (pro-rata factor .08219)

$44,000 per 100 x .80 = $352.00 x .08219 = $28.93
I5 M5 N5 05 P5


Because K5 is less than J5 my pro-rata factor is off by one day
L5 pro-rata factor formula need to be the same for all rows (L5 thru L45)

4-1-2011 to 2-7-2011 = 53 days - apply to $44,000
J5 K5 =(K5-J5+1)/365)
L5 (pro-rata factor -.14247= should be -.14521)
52 days 53 days

$44,000 per 100 x .80 = $352.00 x -.14521 = $51.11
I5 M5 N5 05 P5


How can I make the formula in (L5 thru L45) be able to calculate the right amount of days if K5 is less then J5 and if K5 is greater then J5?
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Hi

Your post is pretty confusing, I can't really make sense of it I'm afraid.
BUT, the bit about calculating the difference if K5 is less than J5 AND if K5 is greater than J5. . . there are several ways to do this.
Probably the easiest way is
Code:
=abs(k5-j5)

You could also try
Code:
=max(k5,j5)-min(k5,j5)

and also
Code:
=if(k5>j5,k5-j5,j5-k5)
 
Upvote 0

Forum statistics

Threads
1,224,522
Messages
6,179,297
Members
452,903
Latest member
Knuddeluff

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top