+ Reply to Thread
Results 1 to 8 of 8

NEED HELP - Fix Macro Automatically SUM upper data when entering new data

  1. #1
    Registered User
    Join Date
    04-27-2016
    Location
    US
    MS-Off Ver
    2007
    Posts
    4

    NEED HELP - Fix Macro Automatically SUM upper data when entering new data

    Hi everybody.
    I have a macro, it will automatically add a row and calculate SUM all the data of upper rows when I entering new data.

    But if I add or delete any value in Quantity column from any Group, the SUM row will not correct because it does not plus or minus that value (please view attached file)

    PN9LBOs.png

    So I want this macro will calculate exactly when I add more or delete any value.
    Please help me fix this macro !!! Thank you!!!! And sorry for my bad English.

    Here is my macro

    Please Login or Register  to view this content.
    Attached Files Attached Files

  2. #2
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: NEED HELP - Fix Macro Automatically SUM upper data when entering new data

    Please Login or Register  to view this content.
    that line makes it skip almost all the code because the quantity column is not column 1 at all, but column 3.
    Please help by:

    Marking threads as closed once your issue is resolved. How? The Thread Tools at the top
    Any reputation (*) points appreciated. Not just by me, but by all those helping, so if you found someone's input useful, please take a second to click the * at the bottom left to let them know

    There are 10 kinds of people in this world... those who understand binary, and those who don't.

  3. #3
    Registered User
    Join Date
    04-27-2016
    Location
    US
    MS-Off Ver
    2007
    Posts
    4

    Re: NEED HELP - Fix Macro Automatically SUM upper data when entering new data

    Quote Originally Posted by Arkadi View Post
    Please Login or Register  to view this content.
    that line makes it skip almost all the code because the quantity column is not column 1 at all, but column 3.
    So how can I fix this code? Can you help me?

  4. #4
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: NEED HELP - Fix Macro Automatically SUM upper data when entering new data

    can you explain in more detail what exactly the code is intended to do? should it be inserting a row? what is the criteria? etc

  5. #5
    Registered User
    Join Date
    04-27-2016
    Location
    US
    MS-Off Ver
    2007
    Posts
    4

    Re: NEED HELP - Fix Macro Automatically SUM upper data when entering new data

    This code will add a new row and calculate sum automatically in that new row.
    For example, look at my screenshot below

    PN9LBOs.png

    When I entering a new data in GROUP column (Group B, C, D...) this code will add a Green row above them and SUM the data of previous Group automatically.
    That how this code work.

    But my trouble is when I add more data in Quantity column, it didn't SUM that new data.
    In my example, SUM of Group C must be "50" instead of "45", because I've added new ID C05.
    So I want this code work more exactly, I want it will plus or minus automatically everytime I add new or remove the value on column QUANTITY.


    You can download my attachment excel file on post #1 and test this code. And please help me fix this code if you can.
    Thank you!!!

  6. #6
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834

    Re: NEED HELP - Fix Macro Automatically SUM upper data when entering new data

    See if this is how you wanted.
    Please Login or Register  to view this content.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    04-27-2016
    Location
    US
    MS-Off Ver
    2007
    Posts
    4

    Re: NEED HELP - Fix Macro Automatically SUM upper data when entering new data

    Quote Originally Posted by jindon View Post
    See if this is how you wanted.
    Please Login or Register  to view this content.
    Yes, I mean that. That all I want.
    Thank you so much jindon. I really appreciate that.

  8. #8
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834

    Re: NEED HELP - Fix Macro Automatically SUM upper data when entering new data

    depchai,

    If that takes care of your original question, select Thread Tools from the menu link above and mark this thread as SOLVED.

+ 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. Possible to transform automatically while entering data?
    By pblge in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-30-2014, 02:24 PM
  2. Entering data into the next row automatically
    By lesoies in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-03-2012, 09:08 AM
  3. Run Macro Automatically from entering data into cell
    By yunesm in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-07-2010, 01:53 PM
  4. Replies: 3
    Last Post: 11-06-2009, 04:50 PM
  5. Entering data automatically
    By luckyros in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 05-21-2009, 03:31 AM
  6. Automatically entering data in cells
    By dipdog in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-16-2006, 12:27 PM
  7. Replies: 3
    Last Post: 08-07-2006, 04:50 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