Distribute Payment over the year based on invoice term

Heba

New Member
Joined
Jan 20, 2021
Messages
7
Office Version
  1. 365
  2. 2019
  3. 2016
  4. 2013
Platform
  1. Windows
Hello Everyone,

That's my first post here :) and I'm desperate for your help,

I have the below sheet and I want to distribute the amount in K4 over the year based on the invoice term and date of course, so if :

1- The invoice term is 12 months it'll appear in every month and not exceed the end date.
2- The invoice term is 3 months it'll appear only each 3 months and not exceed the end date.
3- If the end date year is bigger than current year it'll also appear in current year " See Row 5"

I tried many formulas but in the end the results is missy

Thanks in Advance :)
 
The post includes a few ideas that you can try.
You can paste the information into a clean sheet; see the icon below the F(x)

The first post shows the formula just for M Month, Q Quarter , and O Once.
Review the formulas with Excel's Formula Evaluate and then review the second post that uses Choose.

T202007b.xlsm
ABCDEFGHIJ
1
2DescriptionStart DateEnd DateAmount# Pymts per yrTotal # PaymentsAmountJan-21
7
8Rent1-Jan-211-Mar-2230,000M12152,0002,000
9Insurance1-Mar-2128-Feb-2212,000Q443,0000
10Once17-Mar-2117-Mar-2125,000O1125,0000
4_
Cell Formulas
RangeFormula
G8G8=DATEDIF(B8,EOMONTH(C8,0)+1,"m")
H8H8=D8/G8
G9G9=DATEDIF(B9,C9+1,"m")/3
H9:H10H9=D9/F9
G10,C10G10=F10
F8:F9F8=LOOKUP(E8,{"M",12;"O",1;"Q",4})
J8J8=AND($B8<=J$2,COUNTIF($I8:I8,">0")<$G8)*$H8
J9J9=AND($B9-DAY($B9)+1<=J$2,COUNTIF($I9:I9,">0")<$G9)*(MOD(MONTH(J$2)-MONTH($B9)+$F9-1,($F9-1))=0)*$H9
J10J10=($F10=1)*($B10-DAY($B10)+1=J$2)*$H10


T202007b.xlsm
ABCDEFGHIJKL
1
2DescriptionStart DateEnd DateAmount# Pymts per yrTotal # PaymentsAmountJan-21Feb-21Mar-21
3Rent1-Jan-211-Mar-2230,000M12152,0002,0002,0002,000
4Insurance1-Mar-2128-Feb-2212,000Q443,000003,000
5Once17-Mar-2117-Mar-2125,000O1125,0000025,000
4_
Cell Formulas
RangeFormula
G3G3=DATEDIF(B3,EOMONTH(C3,0)+1,"m")
H3H3=D3/G3
G4G4=DATEDIF(B4,C4+1,"m")/3
H4:H5H4=D4/F4
G5,C5G5=F5
J3:L5J3=CHOOSE(MATCH($E3,{"M","O","Q"},0),(AND($B3<=J$2,COUNTIF($I3:I3,">0")<$G3)*$H3),(($F3=1)*($B3-DAY($B3)+1=J$2)*$H3),(AND($B3-DAY($B3)+1<=J$2,COUNTIF($I3:I3,">0")<$G3)*(MOD(MONTH(J$2)-MONTH($B3)+$F3-1,($F3-1))=0)*$H3))
F3:F4F3=LOOKUP(E3,{"M",12;"O",1;"Q",4})
 
Upvote 0

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney

Forum statistics

Threads
1,214,980
Messages
6,122,563
Members
449,088
Latest member
Motoracer88

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