Calculation based on value in table based on date range

jsand

New Member
Joined
Aug 14, 2024
Messages
1
Office Version
  1. 365
Platform
  1. Windows
  2. Web
Hello, so I am working on this calculator in Excel and am having some trouble and was wondering if anyone could help. The issue is, in Column C, we need a formula that does a calculation based on date ranges. In short, we need to see if payments adding up to the payment amount (In J1) or larger have been made during after the last due date and before or on the new due date and if not, the fine needs to be the fine amount (J2) * the amount of days between the due dates(column R) and the date of the payment. We also need to make sure that if there are two payments in the same period, the fine does not happen twice.

My thought was, see if the date in column A, was between dates in column R, and if it is, they see if the payment made in column S, was larger than the payment amount, J1, and if it is the same or larger, then the value would be 0, but if it were smaller, take the fine amount, J2, and multiply it by 1+(E1* the number of days between the date, column A, and the due date, Column R). And do all this while if a date that is in between the same range has a value other than 0 in column C, have that second fine amount be 0. If anyone has any ideas it would be greatly appreciated. I understand the basic formula needed I think but am getting tripped up on logic statements of seeing if dates are in the date range. Thank you!

My first thought was a formula like this, =IFS(A6>=$R$2, IF($S$3>=$J$1, "0", (DAYS($R$3,A6)*$E$1)+$J$2), A6>=$R$3, IF($S$4>=$J$1, "0", (DAYS($R$4,A6)*$E$1)+$J$2), A6>=$R$4, IF($S$4>=$J$1, "0", (DAYS($R$5,A6)*$E$1)), A6>=$R$5, IF($S$5>=$J$1, "0", (DAYS($R$6,A6)*$J$2)+$J$2), A6>=$R$6, IF($S$6>=$J$1, "0", (DAYS($R$7,A6)*$E$1)+$J$2), A6>=$R$7, IF($S$7>=$J$1, "0", (DAYS($R$8,A6)*$E$1)+$J$2)), but the values keep returning as 0.
 

Attachments

  • excel.PNG
    excel.PNG
    42.5 KB · Views: 22

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type

Forum statistics

Threads
1,224,798
Messages
6,181,038
Members
453,014
Latest member
Chris258

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