Consulting

Results 1 to 8 of 8

Thread: Calculating installments left

  1. #1
    VBAX Mentor Sir Babydum GBE's Avatar
    Joined
    Mar 2005
    Location
    Cardiff, UK
    Posts
    499
    Location

    Calculating installments left

    Hi I need to calculate installments between two dates.

    Suppose A1 contains 10/01/2008 and B1 contains 08/10/2008

    I want, firstly, in C1 to calculate monthly installments between the two. The answer i need to return is 9 because we take A1 to mean it's the first installment (so the 10th of each month is the due date) and October 10 falls after the second date (the 8th of October). So the customer needs to have paid his bill in full from January to September.

    in C2 I need the number of fortnightly installments using the same logic

    and in C3 the same again but weekly installments.

    In the latter two instances the deciding factor is the weekday. So if Jan 10 was a thursday and October 8 were a wednesday, then the final installment would have to be whichever thursday was before the closing date.

    I'm getting annoyed with this one so if you could help that would be fab.
    Have a profound problem? Need a ridiculous solution? Post a question in Babydum's forum

  2. #2
    VBAX Mentor
    Joined
    Oct 2007
    Posts
    372
    Location
    Will you post an example .xls with the desired answers just hard coded?

  3. #3
    VBAX Mentor
    Joined
    Oct 2007
    Posts
    372
    Location
    Try this maybe.

    note: dates are currently in yank format

  4. #4
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    C1: =N(MONTH(A2)-MONTH(A1))+(A2>A1)

    C2: =INT((A2-A1)/14)

    C3: =INT((A2-A1)/7)
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  5. #5
    VBAX Mentor Sir Babydum GBE's Avatar
    Joined
    Mar 2005
    Location
    Cardiff, UK
    Posts
    499
    Location
    Forgive my rudeness in not replying sooner. There was a rather fast paced turn of events at the time of writing and I ended up leaving the company I was working for due to a department restructure.

    For a while I didn't have internet access at home, and the reason I asked the question was no longer relevant to me.

    That said, it was rude to not reply. So... sorry and thanks, of course, for the help.
    Have a profound problem? Need a ridiculous solution? Post a question in Babydum's forum

  6. #6
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    So what are you doing now then?
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  7. #7
    Moderator VBAX Wizard Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    5,059
    Location
    Breathing..... maybe?
    Remember To Do the Following....
    Use [Code].... [/Code] tags when posting code to the thread.
    Mark your thread as Solved if satisfied by using the Thread Tools options.
    If posting the same issue to another forum please show the link

  8. #8
    VBAX Mentor Sir Babydum GBE's Avatar
    Joined
    Mar 2005
    Location
    Cardiff, UK
    Posts
    499
    Location
    Quote Originally Posted by xld
    So what are you doing now then?
    Well yes, I am breathing (for now) Aussiebear, but I think Bob had a more specific answer in mind that had a greater corelation with the statement I made about having left my job.

    The answer, Bob, is "nothing". I'm, as they fashionably like to call it, "between jobs". So if any of you regulars out there know of any jobs going in the vicinity of Cardiff feel free to send me a PM. ("Private Message", not "Prime Minister". I'm really not in the mood to speak to him again this week. - oh, and not "Post Mortem" either - I'm not quite there yet)
    Have a profound problem? Need a ridiculous solution? Post a question in Babydum's forum

Posting Permissions

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