+ Reply to Thread
Results 1 to 14 of 14

Selfupdating cells autosum

  1. #1
    Forum Contributor
    Join Date
    05-10-2016
    Location
    EUROPE
    MS-Off Ver
    Excel 365 64 bitt
    Posts
    178

    Selfupdating cells autosum

    I would like to know how to create self updating cells by range or for entire sheet. By selfupdating I mean that for example if I enter in cell value 4 and later I enter value 3 in that same cell, I would like the same cell to selfupdate itself values 4+3=7.

  2. #2
    Forum Expert
    Join Date
    02-14-2009
    Location
    .
    MS-Off Ver
    ................
    Posts
    2,840

    Re: Selfupdating cells autosum

    Can ony be done using VBA.

    For 1 cell, example A1

    Please Login or Register  to view this content.
    To extend this to a range you could use
    Please Login or Register  to view this content.
    as the check but for simplicity this is limited to single cell changes. It ignores changes to a range of cells using Ctrl-Enter
    Last edited by cytop; 05-10-2016 at 02:15 AM.

  3. #3
    Valued Forum Contributor
    Join Date
    01-03-2016
    Location
    Conwy, Wales
    MS-Off Ver
    2016
    Posts
    974

    Re: Selfupdating cells autosum

    This post has been deleted
    Attached Images Attached Images
    Last edited by Kevin#; 05-10-2016 at 02:13 AM.
    If a response has helped then please consider rating it by clicking on *Add Reputation below the post
    When your issue has been resolved don't forget to mark the thread SOLVED (click Thread Tools at top of thread)

  4. #4
    Forum Contributor
    Join Date
    05-10-2016
    Location
    EUROPE
    MS-Off Ver
    Excel 365 64 bitt
    Posts
    178

    Re: Selfupdating cells autosum

    Thank you so mutch. You have saved me a lot of time, cause I have tried so long to get my VBA code to make this work. I am new here, how can I ask VBA questions for example directly to you? Do you solve also complicated VBA problems (with compensation of course). Again thank you, and wish you only the best in the future.

  5. #5
    Forum Expert
    Join Date
    02-14-2009
    Location
    .
    MS-Off Ver
    ................
    Posts
    2,840

    Re: Selfupdating cells autosum

    can I ask VBA questions for example directly to you
    No - all questions on the public board and whoever answers, answers.

    Do you solve also complicated VBA problems (with compensation of course)
    On a professional basis. I'd be happy to spend the summer in Helsinki with weekends in St. Petersburg but knowing my luck, you're probably in Rovaniemi!

    I would add that what you are doing is not really a good idea (in my opinion). There is no audit of changes (but could be added) and there is no Undo as VBA clears the undo buffer, but glad it helped.
    Last edited by cytop; 05-10-2016 at 03:15 AM. Reason: Additonal comment about Undo

  6. #6
    Valued Forum Contributor
    Join Date
    01-03-2016
    Location
    Conwy, Wales
    MS-Off Ver
    2016
    Posts
    974

    Re: Selfupdating cells autosum

    @cytop - that is a neat solution.

    Here is a small mod that creates a formula in the cell so that you can see every value that has been entered in a cell
    (helps spot an error if wrong value is input)

    Please Login or Register  to view this content.

  7. #7
    Forum Expert
    Join Date
    02-14-2009
    Location
    .
    MS-Off Ver
    ................
    Posts
    2,840

    Re: Selfupdating cells autosum

    Another good alternative... and to be honest, probably preferable to mine for a simple application as the individual changes are not lost.

    Mine came from a project where they wanted that kind of single cell, accumulating input but with a complete audit of who/when. That added a row to an Audit sheet recording the date, time, user, old value & new value.

    I would suggest to the OP that some kind of user accessible 'Undo' is needed for those times a user mistypes - code that changes a changed cell makes it impossible for an ordinary user to correct an error.

  8. #8
    Forum Contributor
    Join Date
    05-10-2016
    Location
    EUROPE
    MS-Off Ver
    Excel 365 64 bitt
    Posts
    178

    Re: Selfupdating cells autosum

    You are a PRO. I tried it and it works very good. Can I ask how long you have used Excel with VBA?
    PS. I live about 12 km from Helsinki, as a family man I hang a lot of time with my 3 years old daughter and wife.
    If you visit Helsinki this summer june 2016 I could use my time to show you Helsinki :-)

    (Thank you)²

  9. #9
    Forum Contributor
    Join Date
    05-10-2016
    Location
    EUROPE
    MS-Off Ver
    Excel 365 64 bitt
    Posts
    178

    Re: Selfupdating cells autosum

    One thing I noticed in the option when formulas are created in cells is that if users uses DELETE key it brings up the debuge information, and it ends up the VBA :-).
    In the first option DELETE key was not problem. Can this be fixed in the option when formulas are created (for example user can not use DELETE key)?

    Thanks in advance.

  10. #10
    Valued Forum Contributor
    Join Date
    01-03-2016
    Location
    Conwy, Wales
    MS-Off Ver
    2016
    Posts
    974

    Re: Selfupdating cells autosum

    This mod prevents non-numeric values being entered

    Please Login or Register  to view this content.

  11. #11
    Valued Forum Contributor
    Join Date
    01-03-2016
    Location
    Conwy, Wales
    MS-Off Ver
    2016
    Posts
    974

    Re: Selfupdating cells autosum

    (More by good fortune than design ) the mod in post#10 prevents the delete key from working!

  12. #12
    Forum Contributor
    Join Date
    05-10-2016
    Location
    EUROPE
    MS-Off Ver
    Excel 365 64 bitt
    Posts
    178

    Re: Selfupdating cells autosum

    It works. Hope that you dont get bored by thanking you, but here it goes again THANK YOU.

  13. #13
    Valued Forum Contributor
    Join Date
    01-03-2016
    Location
    Conwy, Wales
    MS-Off Ver
    2016
    Posts
    974

    Re: Selfupdating cells autosum

    Glad it works for you. If you get bored of thanking, then click on the *AddReputation

    @cytop said in post#07 "I would suggest to the OP that some kind of user accessible 'Undo' is needed for those times a user mistypes - code that changes a changed cell makes it impossible for an ordinary user to correct an error"

    This mod allows you to check that you are putting in the correct value at the time of input

    Please Login or Register  to view this content.

  14. #14
    Forum Contributor
    Join Date
    05-10-2016
    Location
    EUROPE
    MS-Off Ver
    Excel 365 64 bitt
    Posts
    178

    Re: Selfupdating cells autosum

    Hi,

    I have have this code writen in 3 specific sheets for selupdating cells.
    How can I make this code work on module refering to the specific sheets (for example sheet1, sheet2 and sheet3)?

    Thanks for any help I can get.

+ 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. Autosum Grouped Cells
    By joshuarobbins in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 11-25-2015, 09:33 AM
  2. [SOLVED] Autosum discount formula according the cells different from 0.00
    By momchil.vladov in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-02-2014, 04:17 AM
  3. [SOLVED] probably an easy one- want to autosum column but some cells have #N/A
    By Dadof2 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-21-2014, 01:56 PM
  4. Autosum Percent of Complete Cells?
    By paburgess in forum Excel General
    Replies: 1
    Last Post: 06-11-2012, 01:35 PM
  5. VBA for Autosum up on multiple cells
    By moonoo in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 12-09-2010, 02:43 AM
  6. Would like autosum figure to appear in selected cells
    By vinny1 in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 09-23-2009, 07:12 AM
  7. [SOLVED] Autosum returns an incorrect zero value on the selected cells
    By Jerry W. Lewis in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 09-06-2005, 09:05 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