How to make excel to add automatically penalty interest (5% of the total price for example) if a customer crosses the expiring date?
How to make excel to add automatically penalty interest (5% of the total price for example) if a customer crosses the expiring date?
Last edited by quaint_paradox; 12-17-2011 at 04:18 PM.
Price in A1, Expiry Date in B1, Payment Date in C1, this formula in D1
=IF(AND(A1<>"", B1<>""), IF(AND(C1="", B1<TODAY()), A1*5%, ""))
_________________
Microsoft MVP 2010 - Excel
Visit: Jerry Beaucaire's Excel Files & Macros
If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
Always put your code between code tags. [CODE] your code here [/CODE]
?None of us is as good as all of us? - Ray Kroc
?Actually, I *am* a rocket scientist.? - JB (little ones count!)
That would give you 5%, not add 5%.
To add 5% on top:
=IF(AND(A1<>"", B1<>""), IF(AND(C1="", B1<TODAY()), A1*1.05, ""))
Note that C1 (or column C really in this example) needs to be blank for this to work. Meaning the customer has not already paid. If they have already paid, the Penalty total cell will be blank. As such it might be worthwhile not using the payment date column and amending the formula like so:
=IF(AND(A1<>"", B1<>""), IF(B1<TODAY(), A1*1.05, ""))
Last edited by dip11; 12-16-2011 at 08:08 PM.
So what those double apostrophes and commas mean? I have never needed those. If I have to separate things I use semicolon ( ; ). If I just copy that code and chage only the cells it won't work.
Last edited by quaint_paradox; 12-17-2011 at 01:02 PM.
The double quotes mean "show blank", the commas are American parameter dividers, of course you'll change those to semicolons for your version.
There is still a one problem. Code works but it does count the penalty for an item which has not yet crossed the expiration date .
Show is your workbook, point out the problem. Click GO ADVANCED and use the paperclip icon to post up a copy of your workbook.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks