Quarterly prepaid and postponed payments formula

s_1592

New Member
Joined
Mar 5, 2022
Messages
16
Office Version
  1. 2021
Hi there!
I'm trying to build a formula to correctly calculate quarterly prepaid and postponed payments, and I'm a bit stuck at the moment.

As seen in the example below, let's assume a contract start & end dates on Feb 23 & Jan 24.
The quarter period must start from the first month of the contract (so in this case Feb 23) and end on the last month of the contract (Jan 24), as shown in the table.

1/31/20232/28/20233/31/20234/30/20235/31/20236/30/20237/31/20238/31/20239/30/202310/31/202311/30/202312/31/20231/31/2024
Costs100300400500700100200300800100010002000
Quarterly Prepaid800130013004000
Quarterly Postponed800130013004000

Would very much appreciate your help in solving this.

Thank you!
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
Hi, see the linked file for a possible solution...

The formulas used in the table...
C3: =IF(MOD(COLUMN(),3)=0,C2+D2+E2,"") (Range: C3:N3)
C4: =IF(AND(COLUMN()>2,MOD(COLUMN(),3)=2),A2+B2+C2,"") (Range: C4:N4)

QPayments.xlsx

QPayments.png
 
Upvote 0
Hi, see the linked file for a possible solution...

The formulas used in the table...
C3: =IF(MOD(COLUMN(),3)=0,C2+D2+E2,"") (Range: C3:N3)
C4: =IF(AND(COLUMN()>2,MOD(COLUMN(),3)=2),A2+B2+C2,"") (Range: C4:N4)

QPayments.xlsx

View attachment 93131
Thanks for your reply. This formula however will only work for this specific example and when applied to colomns C:N.

I'm trying to build a formula that can correctly calculate the quarterly payments for any start-end date of the contract (not only specifically Feb 23-Jan 24 as shown in the example above).
 
Upvote 0
Hi, I created two new tables for the general case.

Two almost completely empty columns (B and C) are required in the table for two reasons.
The values of cells B1 and C1 are important for the formulas, and the entire two columns are also necessary for the formulas to work correctly.
The Fill Color of the B1 and C1 cells is black, so the values in them are not confusing.

The new formulas used in the tables:
B1: =MOD(MATCH(1,IF(A2:AA2>0,2,0),1)+1,3)
C1: =MOD(MATCH(1,IF(A2:AA2>0,2,0),1),3)
D3: =IF(AND(D2<>"",MOD(COLUMN(),3)=$B1),D2+E2+F2,"") (Range: D3:AA3)
D4: =IF(AND(D2<>"",MOD(COLUMN(),3)=$C1),B2+C2+D2,"") (Range: D4:AA4)

QPayments2.xlsx
QPayments3.xlsx

QPayments2.png


QPayments3.png
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,906
Members
452,366
Latest member
TePunaBloke

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