+ Reply to Thread
Results 1 to 7 of 7

Cell A value change then value B keep on add

  1. #1
    Registered User
    Join Date
    10-12-2011
    Location
    Malaysia
    MS-Off Ver
    Excel 2016
    Posts
    94

    Cell A value change then value B keep on add

    Hi Guys,

    Is that possible if every time value A1 changed then B1 number value keep on add. Example: 00001,00002,00003.

    Thank you

  2. #2
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Cell A value change then value B keep on add

    You would need VBA code for that.

    Can you clarify though, do you want to ADD or COUNT each time A1 changes.

    If you start with 1 in A1, B1 would be 1
    If you change A1 to say 5, should B1 be 2 or 6 ?
    If then you change A1 to say 2, should b1 be 3 or 8 ?

  3. #3
    Registered User
    Join Date
    10-12-2011
    Location
    Malaysia
    MS-Off Ver
    Excel 2016
    Posts
    94

    Re: Cell A value change then value B keep on add

    Hi! I want to add every time A1 changes.

    If the value change A1 to 5 the number will be 2.
    The value will remain at B1.
    The A1 value would be number & text.

    thank you
    Last edited by Dean Zuki; 04-18-2016 at 10:34 PM.

  4. #4
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Cell A value change then value B keep on add

    Right click on the Sheet's Tab, and click View Code
    Paste the following code

    Please Login or Register  to view this content.

  5. #5
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Cell A value change then value B keep on add

    Wait, sounds like you want to COUNT, not ADD

    change this line
    Range("B1").Value = Range("B1").Value + Target.Value
    to
    Range("B1").Value = Range("B1").Value + 1

  6. #6
    Registered User
    Join Date
    10-12-2011
    Location
    Malaysia
    MS-Off Ver
    Excel 2016
    Posts
    94

    Re: Cell A value change then value B keep on add

    Hi Jonmo,

    Sorry. Yes that is what I'm looking for. Reputation added.

    Thank you very much for your help.

    Rgds
    Last edited by Dean Zuki; 04-18-2016 at 10:47 PM.

  7. #7
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Cell A value change then value B keep on add

    You're welcome

+ 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: 1
    Last Post: 11-06-2015, 08:02 AM
  2. If range value change, active cell equal date and time of change.
    By kmakjop in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-31-2015, 02:43 PM
  3. Change the content of a cell based on change the current date
    By aimanraya in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-14-2014, 07:07 AM
  4. Replies: 2
    Last Post: 06-11-2012, 07:30 PM
  5. auto change cell formula on condition of worksheet change in other cells
    By futurejock in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-01-2009, 12:11 AM
  6. Cell value change to trigger macro (worksheet change event?)
    By Neil Goldwasser in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-10-2006, 10:00 AM
  7. Change workbook sheet reference using cell A1 to change a vairable
    By Reed in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-20-2005, 04:06 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