Hi
I need vba code to calculate the fines as follows:
Cell A2 ---> Specified date to pay taxes
Cell B2 ---> Amount of tax
Cell C2 ---> Date on which the tax is paid
Cell D2 ---> The amount paid for taxes
Cell E2 ---> Calculation Date
Cell F2 ---> Amount of fines
-----------------------------------------------------------------
IF(AND(A2>=C2;D2=B2) ---> Cell F2 =0
IF(AND(A2>=C2;D2<B2) ---> Cell F2 = (B2-D2)*0.02*DATEDIF(A2;E2;"M")
IF(AND(A2<C2;D2=B2) ---> Cell F2 = B2*0.02*DATEDIF(A2;C2;"M")
IF(AND(A2<C2;D2<B2) ---> Cell F2 = (B2*0.02*DATEDIF(A2;C2;"M")+((B2-D2)*0.02*DATEDIF(C2;E2;"M")
Bookmarks