+ Reply to Thread
Results 1 to 12 of 12

Adding up in Excel.

  1. #1
    Registered User
    Join Date
    03-20-2011
    Location
    South-Africa
    MS-Off Ver
    Excel 2010
    Posts
    14

    Thumbs up Adding up in Excel.

    Hi.
    First of all, thanks again for this fantastic Forum. I would like to know if this is possible to do.
    Cell A1 is currently empty and without any formulas in it. I am going to enter data in B1. Lets say 100. As soon as I press enter this value must show in cell A1. Here is the trick. As soon as this value is entered in A1, I want B1 to go blank again. Now I enter 200 in B1 and after entering A1 must show 300, (100+200) and B1 must go blank again.

    The reason for this is I have to update the worksheet every day with a lot of data and at the moment I had to add the data on the sheet to the data I want to update with using a calculator and then enter it back in A1. If there is a formula for this I can update A1 everytime by just putting the new value I want to add in B1 and press enter.

    Thanks for your time.

    Lukas.
    Last edited by loekie; 03-26-2011 at 10:56 AM.

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Adding up in Excel.

    Hello Lukas,

    You can't do this with a formula, but you can do it with a macro. Specifically the Sheet Change event. i.e.

    Please Login or Register  to view this content.
    Regards
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    03-20-2011
    Location
    South-Africa
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: Adding up in Excel.

    I don't know if I am doing something stupid, but I can't get the macro to run. It looks like something is missing. As soon as I run the macro I get a "Runtime 424' error. Object required" This is what I got in the macro.
    Please Login or Register  to view this content.

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Adding up in Excel.

    Please Login or Register  to view this content.
    NOT
    Please Login or Register  to view this content.
    you put it in the woeksheet module not a new module ,you dont run it it is automatic
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  5. #5
    Registered User
    Join Date
    03-20-2011
    Location
    South-Africa
    MS-Off Ver
    Excel 2010
    Posts
    14

    Talking Re: Adding up in Excel.

    Thanks, it is working. I had it in a new module. One more thing. Since this is a macro and not a formula that you can copy and paste, is it a big change to make if I want to do the same with (B2-A2) and (B3-A3) and so on?

    Thanks a lot.
    Last edited by loekie; 03-26-2011 at 10:17 AM. Reason: Wrong smiley

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,049

    Re: Adding up in Excel.

    For *any* cell in column B

    Please Login or Register  to view this content.

    Regards
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  7. #7
    Registered User
    Join Date
    03-20-2011
    Location
    South-Africa
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: Adding up in Excel.

    Thank you all. This is really Awesome.

    Lukas.

  8. #8
    Registered User
    Join Date
    11-15-2008
    Location
    Unknown
    MS-Off Ver
    MS Office 2010
    Posts
    6

    Re: Adding up in Excel.

    Hello...I am sorry but I had to ask...whenever I try running this macro, I get an argument not optional error...and I have no idea what's wrong with it...can someone please help me out?

  9. #9
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,049

    Re: Adding up in Excel.

    I thought that this was working. Has something changed?

    Where do you get that error? What line of code?

    Post the sample workbook please.

    Regards

  10. #10
    Registered User
    Join Date
    08-20-2013
    Location
    Flint, MI
    MS-Off Ver
    Excel 2013
    Posts
    2

    Re: Adding up in Excel.

    Hello TMShucks! Could you tell me how to do this a cross a whole sheet? For instance:

    Column C will be the data entry column, Column D will be the totaling column
    Column E will be the data entry column, Column F will be the totaling column
    Column G will be the data entry column, Column H will be the totaling column

    It will do this every other pattern all the way through column GT being a totaling column. Column A has names and column B has the code for what type of hours I have to enter. Please help, I can send you the sheet if needed.

  11. #11
    Registered User
    Join Date
    12-16-2021
    Location
    Kuwait
    MS-Off Ver
    Version 2111
    Posts
    1

    Re: Adding up in Excel.

    Quote Originally Posted by rachelherner View Post
    Hello TMShucks! Could you tell me how to do this a cross a whole sheet? For instance:

    Column C will be the data entry column, Column D will be the totaling column
    Column E will be the data entry column, Column F will be the totaling column
    Column G will be the data entry column, Column H will be the totaling column

    It will do this every other pattern all the way through column GT being a totaling column. Column A has names and column B has the code for what type of hours I have to enter. Please help, I can send you the sheet if needed.
    Hello,

    Was anyone able to figure out how to do exactly this? Thank you!

  12. #12
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2411
    Posts
    26,715

    Re: Adding up in Excel.

    This thread is 8 years old. Please start a new thread if you have a question.

    Administrative Note:

    Welcome to the forum.

    We are happy to help, however whilst you feel your request is similar to this thread, experience has shown that things soon get confusing when answers refer to particular cells/ranges/sheets which are unique to your post and not relevant to the original.

    Please see Forum Rule #4 about hijacking and start a new thread for your query.

    If you are not familiar with how to start a new thread see the FAQ: How to start a new thread
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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