+ Reply to Thread
Results 1 to 19 of 19

Excel formula for Direct Debit calculator - Help Please!

  1. #1
    Registered User
    Join Date
    05-21-2013
    Location
    Birmingham, England
    MS-Off Ver
    Excel 2000
    Posts
    10

    Exclamation Excel formula for Direct Debit calculator - Help Please!

    I work for a general insurance company and have been tasked with producing a Direct Debit (DD) calculator in excel which will show the 1st DD collection date from our customers' bank account. It takes 14 days from the day the policy is sold (not start date) to setup a DD on our systems, so dependent on whether the preferred collection date is within or outside of 14 days from the sold (not start date) date of the policy will determine when the first DD is taken out of the customers account.

    The data that will be entered by the user will be..

    Cell A. Date of policy sold (DD/MM/YYYY)
    Cell B. Start date of policy (DD/MM/YYYY)
    Cell C. Preferred direct debit collection day (DD)

    Entering this information will result in Cell D. showing the date of the 1st DD collection (DD/MM/YYYY)

    Example 1:
    Cell A. Date of policy sold: 01/01/2013
    Cell B. Start date of insurance policy: 01/01/2013
    Cell C. Preferred direct debit collection day: 15
    Cell D. 1st DD collection: 15/01/2013

    Example 2:
    Cell A. Date of policy sold: 01/01/2013
    Cell B. Start date of insurance policy: 06/01/2013
    Cell C. Preferred direct debit collection day: 8
    Cell D. 1st DD collection: 14/01/2013 (being the first possible date we can collect the premium. Each premium thereafter will be collected on the 3rd of each month)

    Preferably I'd like to use a cell formula as I am not very 'techy' and not familiar with VBA. Is there a formula I could use in the results cell that will provide the correct 1st collection date?

    Thanks in advance!

    Milly

  2. #2
    Valued Forum Contributor loginjmor's Avatar
    Join Date
    01-31-2013
    Location
    Cedar Rapids, Iowa
    MS-Off Ver
    Excel 2013
    Posts
    1,073

    Re: Excel formula for Direct Debit calculator - Help Please!

    Hi -

    Assuming all of the data is in row 1, you could use the following formula in cell D1:

    =MAX(C1-1,13)+A1

    Hope that helps.
    ____________________________________________
    If this has solved your problem, please edit the thread title to add the word [SOLVED] at the beginning. You can do this by
    -Go to the top of the first post
    -Select Thread Tools
    -Select Mark thread as Solved

    If I have been particularly helpful, please "bump" my reputation by pressing the small star in the lower left corner of my post.

  3. #3
    Registered User
    Join Date
    05-21-2013
    Location
    Birmingham, England
    MS-Off Ver
    Excel 2000
    Posts
    10

    Re: Excel formula for Direct Debit calculator - Help Please!

    Hi,

    Thanks for this, it works perfectly for the examples I'd given but there are a couple of scenarios where this formula wont work.

    There are 2 exceptions to the formula you've provided:
    1. If the preferred collection day is lower number than the day of the start date it will be taken in the next month.

    Example of this:
    Cell A. Date of policy sold: 01/01/2013
    Cell B. Start date of insurance policy: 17/01/2013
    Cell C. Preferred direct debit collection day: 8
    Cell D. 1st DD collection: 08/02/2013

    2. If the preferred collection day is after the start date but before the 14 days after the sold date, the DD will be taken on the next available day of the month after the 14 days.

    Example of this:
    Cell A. Date of policy sold: 28/01/2013
    Cell B. Start date of insurance policy: 01/02/2013
    Cell C. Preferred direct debit collection day: 5
    Cell D. 1st DD collection: 10/02/2013 (the 14th day after the sold date)

    Really hope this makes sense, here is the spreadsheet if you want to have a play about with it.. Attachment 237226

    Your help is greatly appreciated,

    Milly

  4. #4
    Valued Forum Contributor loginjmor's Avatar
    Join Date
    01-31-2013
    Location
    Cedar Rapids, Iowa
    MS-Off Ver
    Excel 2013
    Posts
    1,073

    Re: Excel formula for Direct Debit calculator - Help Please!

    Hi Milly -

    Try this:

    =IF(MAX(C1-1,13)+A1<B1,EOMONTH(B1,0)+C1,MAX(C1-1,13)+A1)

    Let me know if you need anything else.

  5. #5
    Valued Forum Contributor loginjmor's Avatar
    Join Date
    01-31-2013
    Location
    Cedar Rapids, Iowa
    MS-Off Ver
    Excel 2013
    Posts
    1,073

    Re: Excel formula for Direct Debit calculator - Help Please!

    By the way, I was not able to open your attachment. If you want to attach a file, use the "Go Advanced" button at the lower right corner of the reply window and use the file attachment tool (looks like a paper clip).

  6. #6
    Registered User
    Join Date
    05-21-2013
    Location
    Birmingham, England
    MS-Off Ver
    Excel 2000
    Posts
    10

    Re: Excel formula for Direct Debit calculator - Help Please!

    Hi,

    Thanks again for your help, I've tried entering this formula but it just comes up with '#NAME?'. No doubt it's something I'm doing wrong!

    Here's the attachment (hopefully this time it works). I've used your example on tab 2, let me know what you think.

    DD Calculator.xls

    Thanks,

    Milly

  7. #7
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Excel formula for Direct Debit calculator - Help Please!

    actually i did was press f2 and enter in the cell and it worked
    ....

    excel 2000 has issues with EOMONTH
    http://www.office-archive.com/14-exc...d620e2646a.htm
    Last edited by humdingaling; 05-22-2013 at 03:57 AM.

  8. #8
    Registered User
    Join Date
    05-21-2013
    Location
    Birmingham, England
    MS-Off Ver
    Excel 2000
    Posts
    10

    Re: Excel formula for Direct Debit calculator - Help Please!

    Hmm.. I just tried this but nothing? Could it be because I'm using the 2003 version??

  9. #9
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Excel formula for Direct Debit calculator - Help Please!

    you can replace EOMONTH with
    Please Login or Register  to view this content.
    making the whole code
    Please Login or Register  to view this content.

  10. #10
    Registered User
    Join Date
    05-21-2013
    Location
    Birmingham, England
    MS-Off Ver
    Excel 2000
    Posts
    10

    Re: Excel formula for Direct Debit calculator - Help Please!

    Wow! I think you've almost cracked it.. but I've tried another example where it's not quite right..

    Cell A. Date of policy sold: 15/06/2013
    Cell B. Start date of insurance policy: 20/06/2013
    Cell C. Preferred direct debit collection day: 1
    Cell D. 1st DD collection: Should be 01/07/2013 but it's showing as 28/06/2013?

  11. #11
    Valued Forum Contributor loginjmor's Avatar
    Join Date
    01-31-2013
    Location
    Cedar Rapids, Iowa
    MS-Off Ver
    Excel 2013
    Posts
    1,073

    Re: Excel formula for Direct Debit calculator - Help Please!

    Hi Milly -

    I didn't forget you. I have been pondering these dates for a bit and I'm not sure I'm clear on the logic. The following formula works for your last example:

    =IF(MAX(C1-1,13)+A1<B1,DATE(YEAR(B1),MONTH(B1)+1,1)-1+C1,IF(DAY(MAX(C1-1,13)+A1)>C1,DATE(YEAR(B1),MONTH(B1)+1,1)-1+C1,MAX(C1-1,13)+A1))

    but it doesn't yield the answer you indicated in your first post for the second example. The collection date entered by the user is the date they want their money withdrawn. I get that. But if that date is inside the 14 day window, you go to the next month? Your second example has a DD on January 14, even though their preferred date is the 8th. So there is a DD on 14/1/13 and on 8/2/13?

    Finally, I think the problem with EOMONTH function has to do with international date format (DD/MM/YYY) versus US format (MM/DD/YYYY). Since you want to use international format, I think humdingaling's formula is superior and I incorporated it into the formula above.

    Check out this formula and see if it works for you. If not, let me know what changes need to be made.

  12. #12
    Registered User
    Join Date
    05-21-2013
    Location
    Birmingham, England
    MS-Off Ver
    Excel 2000
    Posts
    10

    Re: Excel formula for Direct Debit calculator - Help Please!

    Hi,

    Right. So I've had a meeting with the head of our operations department to clarify exactly how many different possibilities there are for our DD collections and there are 3. But just to clarify first of all; a policy can be sold months in advance of the start date - in which case we will have had time to setup the DD so can start collecting premiums as soon as the policy starts on the customers preferred collection date (PCD)

    Also in response to your questions, if the PCD is inside the 14 day window, we will take the 1st DD on the first possible day (day 15) after the sold date, so not the next month. So yes, we would therefore collect the 1st DD on 14/01/2013 and the second on 08/02/2013.

    Possibilities:
    1. If the PCD is after the start date but before the 14 days after the sold date, then we will collect the DD on the first possible day (day 15) after the sold date.
    2. If the policy is sold months in advance of the start date, we can collect the first DD on the first PCD after the policy starts.
    3. If the PCD is before the start date (i.e. start date: 2nd of the month / PCD: 1st of the month) then we will collect the first DD on the 2nd of the next month. This is based on the assumption the 14 day window has passed and the DD has been fully setup by this stage.

    So ideally the formula would incorporate all of the above 3 'IFs'.. I've tried your formula however it wouldn't work for all 3 possibilities.

    Really sorry to keep coming back to you, I'm completely stumped and in need of your help!

    Thanks again, really appreciate your help.

    Milly

  13. #13
    Registered User
    Join Date
    05-21-2013
    Location
    Birmingham, England
    MS-Off Ver
    Excel 2000
    Posts
    10

    Re: Excel formula for Direct Debit calculator - Help Please!

    Also here is the template I've been asked to use.

    You can ignore the bit about commission, I've managed to figure out the formula for this based on whatever the 1st DD date is.

    Just so you can see what I'm working with...

    DD Calculator V2.xls

  14. #14
    Valued Forum Contributor loginjmor's Avatar
    Join Date
    01-31-2013
    Location
    Cedar Rapids, Iowa
    MS-Off Ver
    Excel 2013
    Posts
    1,073

    Re: Excel formula for Direct Debit calculator - Help Please!

    Hi Milly -

    No problems. Glad to help. This is an interesting puzzle.

    A few more questions:

    On possibility 1, could you have a case where the Sold date is 17/1/2013, the start date is 31/1/2013, and the PCD is 1 - Then there would be a DD on 31/1/2013 AND a DD on 1/2/2013 - is that a problem (2 DD's one the day after the other)?

    What if the PCD is 31? Some months have 30 days and one has 28 or 29 days. How do you want to handle PCD's of 29, 30, and 31?

    On possibility 3 you say the start date is the 2nd and the PCD is the 1st but the DD would be the 2nd of the following month. Should that be the 1st of the following month? In other words if the Start date is 2/1/2013 and the PCD is the 1st of the month, would the first DD be 2/2/2013 or 1/2/2013?

    Thanks

  15. #15
    Registered User
    Join Date
    05-21-2013
    Location
    Birmingham, England
    MS-Off Ver
    Excel 2000
    Posts
    10

    Re: Excel formula for Direct Debit calculator - Help Please!

    Hi,

    Sorry I should have clarified this previously but the PCD is only available been 1-28 (which would eliminate the 29th,30th,31st problems).

    Which would also resolve the issue you raised regarding possibility 1. But hypothetically, in your example where the sold date is 17/01/2013, start date is 31/01/2013 and the PCD is 1st then the first DD would be the 01/02/2013 because the DD has been fully setup.

    With possibility 3, you're absolutely right! I meant that the 1st DD would be the 01/02/2013. Really sorry for the confusion.

  16. #16
    Valued Forum Contributor loginjmor's Avatar
    Join Date
    01-31-2013
    Location
    Cedar Rapids, Iowa
    MS-Off Ver
    Excel 2013
    Posts
    1,073

    Re: Excel formula for Direct Debit calculator - Help Please!

    Hi Milly -

    Attached is your template with the updated formulas based on the rules discussed previously. I have input all the examples you provided in earlier posts and it appears to come up with the dates you were expecting. I added a cell as a helper to calculate the date of the PCD which must remain in the spreadsheet. You can change the font color to white to match the other hidden cells in your form or you can insert the formula in that cell into the formula that calculated the first DD at every location that refers to that cell, but the equation gets pretty lengthy. I left it black so you could see it. Please insert various date combinations and let me know if you run into any problems.

    Hope this was helpful.
    Attached Files Attached Files

  17. #17
    Registered User
    Join Date
    05-21-2013
    Location
    Birmingham, England
    MS-Off Ver
    Excel 2000
    Posts
    10

    Re: Excel formula for Direct Debit calculator - Help Please!

    Wow! You've only gone and cracked it!!

    I've sent it on to our head of operations for them to test it so I'll let you know what they say. But I've tried several examples and every one of them works.

    I'll post back on Tuesday to let you know. Thanks so much, you're a life saver.

    Milly

  18. #18
    Valued Forum Contributor loginjmor's Avatar
    Join Date
    01-31-2013
    Location
    Cedar Rapids, Iowa
    MS-Off Ver
    Excel 2013
    Posts
    1,073

    Re: Excel formula for Direct Debit calculator - Help Please!

    Glad I could help Milly - Have a great weekend!

  19. #19
    Registered User
    Join Date
    05-21-2013
    Location
    Birmingham, England
    MS-Off Ver
    Excel 2000
    Posts
    10

    Wink Re: Excel formula for Direct Debit calculator - Help Please!

    Quote Originally Posted by loginjmor View Post
    Glad I could help Milly - Have a great weekend!
    Just received a response from our Head of Operations 'Bang on. Works like magic'

    Thanks again for your help, couldn't have done it without you.

    Yey!

    Milly

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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