+ Reply to Thread
Results 1 to 3 of 3

Modify Code that updates (adds/subtracts) One cell by the changing inputs of another

  1. #1
    Forum Contributor
    Join Date
    04-23-2014
    Location
    Liverpool...ish
    MS-Off Ver
    Excel 2013
    Posts
    126

    Modify Code that updates (adds/subtracts) One cell by the changing inputs of another

    I would like to adapt a piece of code that I found and repurpose it.

    Sample-2.xlsm

    The code allows you to update cell ‘A1’ with continual changes in cell ‘A2’. (That is… put a number in A2, press enter and it modifies whatever is in A1 by that number) This works fine but I would like to be able to ‘add’ to cell A1 from cell A2 and ‘subtract’ from A1 from cell B2. The purpose of this is to avoid using negative numbers in user entry.

    I would also like to be able, after update of cell A1 to clear cells A2 and B2. At present, clearing the last entry cancels the last change to A1. You can add the same entry to A2 twice then clear the second one but that is just looking for trouble.

    Anyway, any help would be appreciated as always

    Regards,
    Scott

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,481

    Re: Modify Code that updates (adds/subtracts) One cell by the changing inputs of another

    try this,

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    04-23-2014
    Location
    Liverpool...ish
    MS-Off Ver
    Excel 2013
    Posts
    126

    Updating One Cell (adds/subtracts) by the Changing Inputs of Others

    Auh... I see, I was trying to write a novel when all I needed was a short story...

    I learned a little bit here as well....

    Thank You
    Scott
    Last edited by TheScott; 04-20-2015 at 02:27 AM. Reason: Changed the Title

+ 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. Replies: 10
    Last Post: 03-17-2016, 05:34 AM
  2. Button that subtracts .76, then subtracts from abother cell
    By THEQ100 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-18-2014, 09:41 AM
  3. [SOLVED] Need a formula that subtracts or adds a a specific value
    By superchew in forum Excel General
    Replies: 2
    Last Post: 10-22-2013, 12:23 PM
  4. [SOLVED] Sum adds rather than subtracts negative numbers?
    By innatedoc in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-23-2012, 01:31 AM
  5. creating a button that adds/subtracts
    By gbWildy in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 06-26-2007, 01:10 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