+ Reply to Thread
Results 1 to 2 of 2

Repetative Value update

  1. #1
    Registered User
    Join Date
    04-17-2012
    Location
    Mass
    MS-Off Ver
    Microsft office 365
    Posts
    12

    Repetative Value update

    Not sure if i worded title correctly but heres what Im trying to do:

    I have a value in A1 (say 100). This comes from another sheet and can not be changed.
    I want to take that value and put it into A2 so now A2 is =100.
    Now I want to be able to enter a value into A3 and have that value subtracted from A2 but I want A2 to become that result.
    A2-10 = 90.

    Now I need to be able to enter another value into A3 and have that subtracted from A2

    A2 - 20 =70. and repeat this until value is zero.

  2. #2
    Forum Expert XLent's Avatar
    Join Date
    10-13-2010
    Location
    Northumberland, UK
    MS-Off Ver
    various
    Posts
    2,704

    Re: Repetative Value update

    you either need to

    a) use VBA (consider using the worksheet change event on A1 & A3, specifically)

    right click on Tab name to which this code should apply, select View Code and paste below into resulting window.

    Please Login or Register  to view this content.
    b) enable iteration (calculation option) - with max iteration set to 1

    Formula: copy to clipboard
    Please Login or Register  to view this content.

    result should be 100
    add 10 to A3 -- A2 should drop to 90, and repeat...
    to reset A2 (to A1), clear A3 - A2 should revert to 100

    edit: the firewall is preventing me from posting ideal code but you might want to include a With/End With re: final Target (row 3 in Select Case) such that you can keep A3 the active cell.
    Last edited by XLent; 03-20-2020 at 04:01 AM.

+ 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] Minimizing repetative Code
    By Thompyt in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-29-2019, 08:19 PM
  2. VB UserForm - Repetative Code
    By huntethic in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-21-2015, 11:56 AM
  3. Repetative Printing of multiple databases
    By norain in forum Excel General
    Replies: 1
    Last Post: 12-13-2014, 11:00 PM
  4. repetative formula
    By pacorp66 in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 08-28-2013, 11:48 AM
  5. [SOLVED] Repetative Tasks and Variables
    By alecbowman in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-06-2006, 06:35 PM
  6. Repetative Row Deletes
    By scratching my head in forum Excel General
    Replies: 1
    Last Post: 05-30-2005, 05:05 PM
  7. Repetative conditional formatting
    By Danielle in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-15-2005, 08:54 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