Want to help achieving result

James Clear

Board Regular
Joined
Jul 12, 2021
Messages
139
Office Version
  1. 365
  2. 2016
  3. 2013
  4. 2010
Platform
  1. Windows
Hi team,

I want to start counting payments basis month

If suppose my month is given Aug'23 then paym1 will be placed in Aug'23 and then Sep'23 , Oct'23 so on

If suppose month is Jun'23 then Payment1 will be placed in Jun'23

Pls help me ASAP



1699333538518.png
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
You seem to be covering off a lot of versions in what you are using. Also you Month headings are all over the place and the sample output seems to assume they are in order which they are not.

Someone else can probably give you a more complete solution especially if you can use an MS 365 solution in the meantime see if this helps.
The Let makes the formula smaller but this can be done without using the Let.

20231107 Payment Schedule based on Min Max James Clear.xlsx
ABCDEFGHIJKLMNOPQRSTUVWXYZ
1InputOutput
2Paym1Paym2Paym3Paym4Paym5Paym6Paym7Paym8MonthFeb-23Mar-23Apr-23May-23Jun-23Jul-23Aug-23Sep-23Oct-23Nov-23Dec-23Jan-24Feb-24Mar-24Apr-24May-24Jun-24
3624434494286691Jul-23      624434494286691   
418438468447172Sep-23        18438468447172 
51511299791117215Aug-23       1511299791117215  
62938124422653134Jun-23     2938124422653134    
Sheet1
Cell Formulas
RangeFormula
J3:Z6J3=LET(mthNo,IFERROR(DATEDIF($I3,J$2,"m"),0), rPaymHdg,$A$2:$H$2, rPaym,$A3:$H3, IF(OR(mthNo=0,mthNo>COUNTA(rPaymHdg)),"",INDEX(rPaym,0,mthNo)))
 
Upvote 0
Solution
You seem to be covering off a lot of versions in what you are using. Also you Month headings are all over the place and the sample output seems to assume they are in order which they are not.

Someone else can probably give you a more complete solution especially if you can use an MS 365 solution in the meantime see if this helps.
The Let makes the formula smaller but this can be done without using the Let.

20231107 Payment Schedule based on Min Max James Clear.xlsx
ABCDEFGHIJKLMNOPQRSTUVWXYZ
1InputOutput
2Paym1Paym2Paym3Paym4Paym5Paym6Paym7Paym8MonthFeb-23Mar-23Apr-23May-23Jun-23Jul-23Aug-23Sep-23Oct-23Nov-23Dec-23Jan-24Feb-24Mar-24Apr-24May-24Jun-24
3624434494286691Jul-23      624434494286691   
418438468447172Sep-23        18438468447172 
51511299791117215Aug-23       1511299791117215  
62938124422653134Jun-23     2938124422653134    
Sheet1
Cell Formulas
RangeFormula
J3:Z6J3=LET(mthNo,IFERROR(DATEDIF($I3,J$2,"m"),0), rPaymHdg,$A$2:$H$2, rPaym,$A3:$H3, IF(OR(mthNo=0,mthNo>COUNTA(rPaymHdg)),"",INDEX(rPaym,0,mthNo)))
Yes this helped me… appreciate, if you could explain me the last piece of this puzzle.

OR(mthNo=0,mthNo>COUNTA(rPaymHdg)),"",INDEX(rPaym,0,mthNo)))[/XD][/XR][/RANGE]
 
Upvote 0
62 should have been in Jul-23 and not in Aug-23
Just fix this I just added the "+1" in the formula calculating the MthNo

Rich (BB code):
=LET(mthNo,IFERROR(DATEDIF($I3,J$2,"m")+1,0),
rPaymHdg,$A$2:$H$2,
rPaym,$A3:$H3,
IF(OR(mthNo=0,mthNo>COUNTA(rPaymHdg)),"",INDEX(rPaym,0,mthNo)))

if you could explain me the last piece of this puzzle.

IF(OR(mthNo=0,mthNo>COUNTA(rPaymHdg)),"",INDEX(rPaym,0,mthNo)))
When the date in the heading matches the date in the Month column I then DateDif will = 0 months. As per the above this should be the first figure we want so I have added +1.
If the date is before the heading month then date dif will calculate a negative value and error out. The IfError will convert that error to returning a zero.
This is one of the conditions in the OR statement which will then return "" if the month is earlier than the month in the heading.
The other part of the OR statement will check / count how many Paym columns we need to cater for and once we exceed that number of months it alo needs to return a "".
Index is returning the respective Paym column from 1 to the number of Paym columns (currently 8) for the current row.
Let me know if I have only added to your confusion or whether the explanation works for you
 
Upvote 0

Forum statistics

Threads
1,223,268
Messages
6,171,100
Members
452,379
Latest member
IainTru

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