+ Reply to Thread
Results 1 to 37 of 37

Calculating Payment Due Dates Automatically

  1. #1
    Registered User
    Join Date
    02-12-2023
    Location
    New Zealand
    MS-Off Ver
    Excel Version 1808 (2019), 2016
    Posts
    21

    Calculating Payment Due Dates Automatically

    Hello all, I'm new here and Excel. I require some assistance with the creation of a formula.

    Purpose: To automatically calculate the payment next due dates based on a commencement date and today for a subscription based services with varying periods. It needs to update the 'payment next due' as time goes on without user input.

    Problem: How do I get the 'Payment Next Due' column to automatically do that aforementioned calculation?

    Thank you all!
    Attached Files Attached Files
    Last edited by Exodian; 02-13-2023 at 10:57 PM.

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Calculating Payment Due Dates Automatically

    Non-editable pictures are of NO USE. Please upload a sample EXCEL file here, that meets our guidleines (see yellow banner - top of screen).
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Registered User
    Join Date
    02-12-2023
    Location
    New Zealand
    MS-Off Ver
    Excel Version 1808 (2019), 2016
    Posts
    21

    Re: Calculating Payment Due Dates Automatically

    I apologize Glenn, thank you for the advise. I have reworked the post. Attached is a sample excel file as requested.

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Calculating Payment Due Dates Automatically

    Hi. One row with a formula that does not work isn't very helpful, either. Your explanation is far from complete.

    1. Re-post the file WITHOUT links to your real data. the dropdowns are not working and the named ranges are referring to your real sheet.

    2. Add 5-10 rows with expected results (as requested in the yellow banner that I asked you to look at).

  5. #5
    Registered User
    Join Date
    02-12-2023
    Location
    New Zealand
    MS-Off Ver
    Excel Version 1808 (2019), 2016
    Posts
    21

    Re: Calculating Payment Due Dates Automatically

    Hello, I am no longer interested in getting help at this time. I apologize that I have wasted your time, I will try my best to figure it out on my own. Thank you for your time Glenn.
    Last edited by Exodian; 02-13-2023 at 09:07 PM.

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Calculating Payment Due Dates Automatically

    You clearlymisu derstand how the forum works. We do this for fun, for free. We therefore expect you to make it immediately clear to us what you want. In short, you need to put some effort into making your problem clear to us.

    In your file, there was no indication of your expected answers and your dropdown did not work.

    You are of course welcome back at any time, but are also free to go elsewhere if you are unwilling to make the effort and provide a clear set of instructions.
    Last edited by Glenn Kennedy; 02-13-2023 at 12:48 AM.

  7. #7
    Registered User
    Join Date
    02-12-2023
    Location
    New Zealand
    MS-Off Ver
    Excel Version 1808 (2019), 2016
    Posts
    21

    Re: Calculating Payment Due Dates Automatically

    Hello, I have struggled to try and get anything working for this. I am again asking for your help.

    I have:
    - Reworked the mock-up Excel Spreadsheet.
    - Added between 10-20 rows.
    - Removed all Excel personal data.
    - Stripped the file of all personal meta data.
    - Created some more remarks in the file.
    - Removed any of the spreadsheet external links and lists.

    Attached to the first post is my mock-up spreadsheet. I know I don't deserve help but any would be appreciated.

    Please let me know if you need more context or content to work with. Thank you!
    Last edited by Exodian; 02-13-2023 at 09:06 PM.

  8. #8
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Calculating Payment Due Dates Automatically

    Still not clear...

    I haven't done w & d yet, and don't get the same answer as you for Q.

    B9. Quarterly due 15/5/22. Then 15/8/22, 15/11/22 then 15/2/23.... why is your expected answer 15/4?? A bit confused. Please refer to the file for formula (so far) and explain.
    Attached Files Attached Files

  9. #9
    Forum Expert
    Join Date
    09-30-2019
    Location
    Chiangmai, Thailand
    MS-Off Ver
    Office 2016, Excel 2019
    Posts
    1,234

    Re: Calculating Payment Due Dates Automatically

    Please review in this post : https://www.excelforum.com/excel-for...ml#post5665550
    it's may help.

    Regards.

  10. #10
    Registered User
    Join Date
    02-12-2023
    Location
    New Zealand
    MS-Off Ver
    Excel Version 1808 (2019), 2016
    Posts
    21

    Re: Calculating Payment Due Dates Automatically

    Quote Originally Posted by Glenn Kennedy View Post
    Still not clear...

    I haven't done w & d yet, and don't get the same answer as you for Q.

    B9. Quarterly due 15/5/22. Then 15/8/22, 15/11/22 then 15/2/23.... why is your expected answer 15/4?? A bit confused. Please refer to the file for formula (so far) and explain.
    Wow, that is amazing. That is exactly as intended minus the w & d (as you stipulated). Your fast response was very impressive. With regards to the quarterly, I miscalculated all of them. The answers you provided was the intended dates. It looks like you have the general idea of what I was trying to do. Sorry for the mistakes, is there anything else unclear?
    Sincerely,

    ~EXO

  11. #11
    Registered User
    Join Date
    02-12-2023
    Location
    New Zealand
    MS-Off Ver
    Excel Version 1808 (2019), 2016
    Posts
    21

    Re: Calculating Payment Due Dates Automatically

    Just saw this, let me have a look. Thank you for the link!

  12. #12
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Calculating Payment Due Dates Automatically

    Next step. I forgot to include the Billing Quantity. Now included. I still haven't quite got my head round the weeks part, yet.


    There was a training space " d" in the red cells that got in the way. deleted.


    Check this over.
    Attached Files Attached Files

  13. #13
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Calculating Payment Due Dates Automatically

    Ignore days... it's wrong. I will have it (and weeks) fixed in a few minutes.

  14. #14
    Registered User
    Join Date
    02-12-2023
    Location
    New Zealand
    MS-Off Ver
    Excel Version 1808 (2019), 2016
    Posts
    21

    Re: Calculating Payment Due Dates Automatically

    Quote Originally Posted by Glenn Kennedy View Post
    Next step. I forgot to include the Billing Quantity. Now included. I still haven't quite got my head round the weeks part, yet.


    There was a training space " d" in the red cells that got in the way. deleted.


    Check this over.
    That was so fast, I can't imagine how many years of Excel experience you have. I can't even comprehend some of the formula at face value. I will have to break it down. I didn't notice the space. I will have to work on minimizing such errors.
    Thank you for your time Glenn, it is greatly appreciated.
    Last edited by Exodian; 02-13-2023 at 10:26 PM.

  15. #15
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Calculating Payment Due Dates Automatically

    I >>>THINK<<< it's complete now!! My brain hurts. there's a possibility that it might be one day out for w and (maybe) d. I don't think so, but it's over to you to check.
    Attached Files Attached Files

  16. #16
    Registered User
    Join Date
    02-12-2023
    Location
    New Zealand
    MS-Off Ver
    Excel Version 1808 (2019), 2016
    Posts
    21

    Re: Calculating Payment Due Dates Automatically

    Quote Originally Posted by Glenn Kennedy View Post
    I >>>THINK<<< it's complete now!! My brain hurts. there's a possibility that it might be one day out for w and (maybe) d. I don't think so, but it's over to you to check.
    Your solution to this issue was decidedly remarkable, Glenn! I was at a total loss as to how to address it, but you managed to do so with utmost efficacy. My appreciation for your effort and expertise is boundless. Thank you!
    + Rep

  17. #17
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Calculating Payment Due Dates Automatically

    Glad we got there... despite a bit of a temper tantrum (from both parties!!) at the start. All rattles now safely stowed back in our prams (do you have the expression "throwing your rattle out of the pram" for a bit of a tantrum... you probably do).

    I'm also glad I don't have to unpick it again and fix further faults. It was a bit complicated.

  18. #18
    Registered User
    Join Date
    02-12-2023
    Location
    New Zealand
    MS-Off Ver
    Excel Version 1808 (2019), 2016
    Posts
    21

    Re: Calculating Payment Due Dates Automatically

    I could not suppress a chuckle at the sight of your expression. Indeed, you were accurate in your assessment. Having said that, the blunder was exclusively mine; I had been somewhat tense the day before and should not have submitted a hastily completed post and reacted irately when I was the one seeking assistance. Wishing you the best of luck Glenn.

  19. #19
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Calculating Payment Due Dates Automatically

    Hahaha. Time to hit the beach, now! Checking out... G.

  20. #20
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Calculating Payment Due Dates Automatically

    It occurred to me, while walking, that q and y are not needed, as these are the same as 3 and 12 m. So with free entry of a number in quantity and a dropdown of d, w and m for units, it could be made a fair bit simpler.

    Interested?

  21. #21
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2016 & H&B2021
    Posts
    3,059

    Re: Calculating Payment Due Dates Automatically

    Try this formula,
    PHP Code: 
    =CHOOSE(LOOKUP(F4,{"d","m","q","w","y"},{1,2,3,4,5}),
    INDEX(DATE(YEAR($C4),MONTH($C4),DAY($C4)+ROW(INDIRECT("1:10000"))*$E4),MATCH(TRUE,DATE(YEAR($C4),MONTH($C4),DAY($C4)+ROW(INDIRECT("1:10000"))*$E4)>=TODAY(),0)),
    INDEX(DATE(YEAR($C4),MONTH($C4)+ROW(INDIRECT("1:10000"))*$E4,DAY($C4)),MATCH(TRUE,DATE(YEAR($C4),MONTH($C4)+ROW(INDIRECT("1:10000"))*$E4,DAY($C4))>=TODAY(),0)),
    INDEX(DATE(YEAR($C4),MONTH($C4)+ROW(INDIRECT("1:10000"))*$E4*3,DAY($C4)),MATCH(TRUE,DATE(YEAR($C4),MONTH($C4)+ROW(INDIRECT("1:10000"))*$E4*3,DAY($C4))>=TODAY(),0)),
    INDEX(DATE(YEAR($C4),MONTH($C4),DAY($C4)+ROW(INDIRECT("1:10000"))*$E4*7),MATCH(TRUE,DATE(YEAR($C4),MONTH($C4),DAY($C4)+ROW(INDIRECT("1:10000"))*$E4*7)>=TODAY(),0)),
    INDEX(DATE(YEAR($C4)+ROW(INDIRECT("1:10000"))*$E4,MONTH($C4),DAY($C4)),MATCH(TRUE,DATE(YEAR($C4)+ROW(INDIRECT("1:10000"))*$E4,MONTH($C4),DAY($C4))>=TODAY(),0))) 

  22. #22
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2016 & H&B2021
    Posts
    3,059

    Re: Calculating Payment Due Dates Automatically

    The formula is rather long, but should give you a more accurate answer.

  23. #23
    Registered User
    Join Date
    02-12-2023
    Location
    New Zealand
    MS-Off Ver
    Excel Version 1808 (2019), 2016
    Posts
    21

    Re: Calculating Payment Due Dates Automatically

    That's quite smart Glenn, it'll make it more clean. Would I use data evaluation to create a drop-down list?
    Is this better? I just removed the q and y from the list.
    PHP Code: 
    =IF(F5="w",C5+7*INT(DATEDIF(C5,TODAY(),"d")/7)+7,IF(F5="d",C5+IFERROR(1/(1/(E5*(INT((TODAY()-C5)/E5)))),E5),EDATE(C5,E5*LOOKUP(F5,{"m"},{1})*(INT(DATEDIF(C5,TODAY(),"m")/(E5*LOOKUP(F5,{"m"},{1}))+1))))) 
    Last edited by Exodian; 02-14-2023 at 09:27 PM.

  24. #24
    Registered User
    Join Date
    02-12-2023
    Location
    New Zealand
    MS-Off Ver
    Excel Version 1808 (2019), 2016
    Posts
    21

    Re: Calculating Payment Due Dates Automatically

    Quote Originally Posted by josephteh View Post
    Try this formula,
    PHP Code: 
    =CHOOSE(LOOKUP(F4,{"d","m","q","w","y"},{1,2,3,4,5}),
    INDEX(DATE(YEAR($C4),MONTH($C4),DAY($C4)+ROW(INDIRECT("1:10000"))*$E4),MATCH(TRUE,DATE(YEAR($C4),MONTH($C4),DAY($C4)+ROW(INDIRECT("1:10000"))*$E4)>=TODAY(),0)),
    INDEX(DATE(YEAR($C4),MONTH($C4)+ROW(INDIRECT("1:10000"))*$E4,DAY($C4)),MATCH(TRUE,DATE(YEAR($C4),MONTH($C4)+ROW(INDIRECT("1:10000"))*$E4,DAY($C4))>=TODAY(),0)),
    INDEX(DATE(YEAR($C4),MONTH($C4)+ROW(INDIRECT("1:10000"))*$E4*3,DAY($C4)),MATCH(TRUE,DATE(YEAR($C4),MONTH($C4)+ROW(INDIRECT("1:10000"))*$E4*3,DAY($C4))>=TODAY(),0)),
    INDEX(DATE(YEAR($C4),MONTH($C4),DAY($C4)+ROW(INDIRECT("1:10000"))*$E4*7),MATCH(TRUE,DATE(YEAR($C4),MONTH($C4),DAY($C4)+ROW(INDIRECT("1:10000"))*$E4*7)>=TODAY(),0)),
    INDEX(DATE(YEAR($C4)+ROW(INDIRECT("1:10000"))*$E4,MONTH($C4),DAY($C4)),MATCH(TRUE,DATE(YEAR($C4)+ROW(INDIRECT("1:10000"))*$E4,MONTH($C4),DAY($C4))>=TODAY(),0))) 
    Hey, thank you for your solution. I've tried the formula but I'm getting a 'value not found' or 'value not available' error (even with correct, valid values in the referenced cells

  25. #25
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Calculating Payment Due Dates Automatically

    All done. Data validation included.

    =IF(F4="d",C4+IFERROR(1/(1/(E4*(INT((TODAY()-C4)/E4)))),E4),IF(F4="w",C4+7*INT(DATEDIF(C4,TODAY(),"d")/7)+7,EDATE(C4,E4*(INT(DATEDIF(C4,TODAY(),"m")/(E4)+1)))))
    Attached Files Attached Files

  26. #26
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Calculating Payment Due Dates Automatically

    Minor tweak for no renewal date entered:

    =IF(C19="","",IF(F19="d",C19+IFERROR(1/(1/(E19*(INT((TODAY()-C19)/E19)))),E19),IF(F19="w",C19+7*INT(DATEDIF(C19,TODAY(),"d")/7)+7,EDATE(C19,E19*(INT(DATEDIF(C19,TODAY(),"m")/(E19)+1))))))
    Attached Files Attached Files

  27. #27
    Registered User
    Join Date
    02-12-2023
    Location
    New Zealand
    MS-Off Ver
    Excel Version 1808 (2019), 2016
    Posts
    21

    Re: Calculating Payment Due Dates Automatically

    Oh my, you work Excel quickly. Thank you very much for your fixes!
    I think there might be a bug with regards to more than one week but it can be circumvented by using the days equivalent of it
    Last edited by Exodian; 02-14-2023 at 09:35 PM.

  28. #28
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2016 & H&B2021
    Posts
    3,059

    Re: Calculating Payment Due Dates Automatically

    Thanks Glenn for the great formula. But I think it needs to be refined further. The following will give the wrong answers:

    Calculating Payment Due Dates Automatically.png
    Attached Files Attached Files

  29. #29
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2016 & H&B2021
    Posts
    3,059

    Re: Calculating Payment Due Dates Automatically

    Quote Originally Posted by Exodian View Post
    Hey, thank you for your solution. I've tried the formula but I'm getting a 'value not found' or 'value not available' error (even with correct, valid values in the referenced cells
    Please attach your file.

  30. #30
    Registered User
    Join Date
    02-12-2023
    Location
    New Zealand
    MS-Off Ver
    Excel Version 1808 (2019), 2016
    Posts
    21

    Re: Calculating Payment Due Dates Automatically

    Quote Originally Posted by josephteh View Post
    Please attach your file.
    Hey Joseph, thank you your time. Below is the attached file as requested for your review. Thank you for your help as well. It's greatly appreciated!
    Subscription tracker (1).xlsx
    Last edited by Exodian; 02-14-2023 at 11:52 PM.

  31. #31
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2016 & H&B2021
    Posts
    3,059

    Re: Calculating Payment Due Dates Automatically

    Exodian, what Excel version are you using?
    Attached Files Attached Files

  32. #32
    Registered User
    Join Date
    02-12-2023
    Location
    New Zealand
    MS-Off Ver
    Excel Version 1808 (2019), 2016
    Posts
    21

    Re: Calculating Payment Due Dates Automatically

    Ahh, Excel 2019, version 1808. I will try it out on OFFICE 365, I didn't even think about the Excel version. Thanks for pointing that out!

  33. #33
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2016 & H&B2021
    Posts
    3,059

    Re: Calculating Payment Due Dates Automatically

    I have changed the formula slightly by replacing LOOKUP with MATCH, try to hit Ctrl+Shift+Enter (instead of Enter) the array formula.
    Attached Files Attached Files
    Last edited by josephteh; 02-15-2023 at 12:07 AM. Reason: Attach file

  34. #34
    Registered User
    Join Date
    02-12-2023
    Location
    New Zealand
    MS-Off Ver
    Excel Version 1808 (2019), 2016
    Posts
    21

    Re: Calculating Payment Due Dates Automatically

    I pressed Ctrl + Shift + Enter and it worked immediately, what does that do?
    I would give you rep but I have already given you one. Thank you so much.

  35. #35
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2016 & H&B2021
    Posts
    3,059

    Re: Calculating Payment Due Dates Automatically

    Please read here for array formula explanation:
    https://www.excelmojo.com/array-form...%20formula%5D.

  36. #36
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2016 & H&B2021
    Posts
    3,059

    Re: Calculating Payment Due Dates Automatically

    I believe Glenn's formula is almost there, just need a bit more tweaking.

  37. #37
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Calculating Payment Due Dates Automatically

    I hadn't seen the subsequent posts. Joseph... you may indeed be correct. A revised version is attached.

    =IF(C4="","",IF(F4="d",C4+E4*ROUNDUP((DATEDIF(C4,TODAY(),"d")/(E4)),0),IF(F4="w",C4+E4*ROUNDUP((DATEDIF(C4,TODAY(),"d")/(E4*7)),0)*7,EDATE(C4,E4*(INT(DATEDIF(C4,TODAY(),"m")/(E4)+1))))))
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Calculating number of weeks after a payment
    By quickheart in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-05-2016, 09:33 AM
  2. Calculating payment coverage
    By ABSTRAKTUS in forum Excel General
    Replies: 3
    Last Post: 10-18-2015, 12:48 PM
  3. [SOLVED] Calculating Payment Terms
    By meyero90 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 05-30-2013, 10:28 AM
  4. [SOLVED] Calculating daily mileage payment
    By alarm_guy1 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 05-13-2013, 02:23 PM
  5. Calculating a bond YIELD with adjusted coupon payment dates
    By chrissy12 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 08-14-2012, 06:03 AM
  6. Replies: 10
    Last Post: 11-29-2011, 08:21 PM
  7. Excel 2007 : Calculating a payment when one knows the PV
    By snyderbugg in forum Excel General
    Replies: 1
    Last Post: 11-01-2009, 06:51 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1