+ Reply to Thread
Results 1 to 3 of 3

flexible update of remaining amount and end date based on current month

Hybrid View

k1dr0ck flexible update of remaining... 05-05-2015, 01:27 AM
samba_ravi Re: flexible update of... 05-05-2015, 01:48 AM
k1dr0ck Re: flexible update of... 05-05-2015, 03:09 AM
  1. #1
    Valued Forum Contributor
    Join Date
    12-01-2011
    Location
    Philippines
    MS-Off Ver
    Excel 2021
    Posts
    979

    Question flexible update of remaining amount and end date based on current month

    Hi,

    I have a simple worksheet that calculates the outstanding amount(D1) and the end date(B7) from the amounts on Row 4 based on the current month(E1), starting month(B6) and monthly amount(B5).

    my problem is when i change monthly amount(B5), for example, to 1,500 and add an amount to Row 4 ,for example, on C4 20,000 it shows an incorrect amount on D1 and incorrect end date on B7 based on the current month.

    How do I make the formula, or a VBA code if possible, be flexible to make the correct calculations to update D1 and E7 when i make changes on Row 4 and B5?

    I've attached my sample file.
    Attached Files Attached Files

  2. #2
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,937

    Re: flexible update of remaining amount and end date based on current month

    Try
    B7=DATE(YEAR(B6),MONTH(B6)+INT(B4/B5)-1,1)
    D1=MAX(0,B4-DATEDIF(B6,E1,"m")*B5)
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  3. #3
    Valued Forum Contributor
    Join Date
    12-01-2011
    Location
    Philippines
    MS-Off Ver
    Excel 2021
    Posts
    979

    Re: flexible update of remaining amount and end date based on current month

    initially it has deducted 1,000 per month from Jan to Apr, so D1 is 16,000, then on May if i add 20,000 on C4 and make it 1,500 on B5, D1 is only 14,000 it should now be 36,000 and B7 is Jan-16 it should now be Apr-17 --- (1,500 per month May-15 to Apr-17)

    another example problem on May if i add 20,000 on C4 and make it 2,500 on B5, D1 should now be 36,000 and B7 should now be Jul-16 --- (2,500 per month May-15 to Jun-16 but 1,000 only for Jul-16) how do i show that it should only be 1,000 for the last month?

    i think a vba code is best suited to handle the problem but i dont know how to manipulate dates using vba code

+ 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] Calculate time remaining based on end date & time and current date
    By Kaz09 in forum Excel Formulas & Functions
    Replies: 33
    Last Post: 08-19-2014, 07:11 AM
  2. [SOLVED] Formula for amount on previous month based on current month
    By Yu Marquez in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 02-21-2014, 12:42 AM
  3. [SOLVED] VBA to identify the current month and previous month based on system date
    By ravikumar00008 in forum Excel General
    Replies: 10
    Last Post: 07-26-2012, 10:04 AM
  4. sum amount based on current month
    By ChalkerL in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-23-2009, 08:10 AM
  5. Current date formula based on month
    By Renz09 in forum Excel General
    Replies: 2
    Last Post: 05-05-2006, 02:04 AM

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