+ Reply to Thread
Results 1 to 8 of 8

Automatically subtract an amount each month from a cell

  1. #1
    Registered User
    Join Date
    03-05-2008
    Location
    Ontario, Canada
    MS-Off Ver
    2010 Pro Plus
    Posts
    78

    Automatically subtract an amount each month from a cell

    I think the title sums this one up for the most part. I have a cell with a value in it, I just want to automatically subtract 150 from that value each month when the month changes.

    What would be the best way to approach that?

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,199

    Re: Automatically subtract an amount each month from a cell

    We still need a workbook (see yellow banner for instructions on how to attach) as we have no idea how your data is organised.
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  3. #3
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,587

    Re: Automatically subtract an amount each month from a cell

    Workbook_Open event is used. When workbook s opened if month is different from the month of E2 amount is deducted. E2 will get Today() date.
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Developer-->> visual Basic-->> VB window opens
    select Workbook--> Paste the Code-->> Save the file as .xlsm
    Attached Files Attached Files
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,199

    Re: Automatically subtract an amount each month from a cell

    Amended VBA re Range references

    Please Login or Register  to view this content.

  5. #5
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,587

    Re: Automatically subtract an amount each month from a cell

    Thanks John topley for correction.
    Pl see file for corrected code.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    03-05-2008
    Location
    Ontario, Canada
    MS-Off Ver
    2010 Pro Plus
    Posts
    78

    Re: Automatically subtract an amount each month from a cell

    example included.... I want to automatically subtract number 2 from number 1 every month.

    I thought this could be done with a formula though, or can it only be done with VBA?
    Attached Files Attached Files

  7. #7
    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,036

    Re: Automatically subtract an amount each month from a cell

    It can be done with a formula:

    =25400-DATEDIF(DATE(2023,3,1),TODAY(),"m")*B2

    This will subtract the first 103.5 on 1st April...another one on 1st May, etc.

    Test it using

    =25400-DATEDIF(DATE(2023,3,1),DATE(2023,4,1),"m")*B2

    where the bit in red is a future date (Y,m,d)
    Attached Files Attached Files
    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

  8. #8
    Registered User
    Join Date
    03-05-2008
    Location
    Ontario, Canada
    MS-Off Ver
    2010 Pro Plus
    Posts
    78

    Re: Automatically subtract an amount each month from a cell

    Much appreciated.
    All the formulas I've been shown in the last week or so have really helped make my budget spreadsheet much much easier to manage.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] If cell value is not equal to a value then subtract an amount
    By nickpavlov in forum Excel General
    Replies: 7
    Last Post: 01-12-2023, 07:06 PM
  2. [SOLVED] Bill amount automatically changing depending on which month / year selected
    By digitised in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-06-2020, 06:58 AM
  3. Replies: 6
    Last Post: 08-18-2019, 10:21 PM
  4. [SOLVED] subtract from a specific amount but keep total in same cell?
    By michaelDDW in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-03-2015, 08:37 PM
  5. [SOLVED] Automatically add an amount to a cell on 1st of each month
    By MiniMum97 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-30-2014, 08:25 PM
  6. Replies: 4
    Last Post: 12-02-2013, 03:27 AM
  7. Formula for amount owing subtract amount paid
    By Taperchart in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-04-2006, 12:55 PM

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