+ Reply to Thread
Results 1 to 5 of 5

running count in horizontal row?

  1. #1
    Registered User
    Join Date
    01-24-2010
    Location
    Tenneessee
    MS-Off Ver
    Excel 2007
    Posts
    3

    running count in horizontal row?

    Is there any way to create a running count in one horizontal thread? I can create a running count in vertical columns,but not horizontal threads?

    I have a spreadsheet that I want to keep track of how many rounds mulitple weapons have fired. I have a current rounds cell, a last fired cell and total rounds cell. The problem is that when I enter the number of rounds shot in the "last fired cell", the sum of the total rounds cell goes up (via the sum function) however, is there a way to keep that number there, even though I will replace the last fired cell with a new number the next time I fire the weapon?
    Attached Files Attached Files
    Last edited by bwilkinson; 01-24-2010 at 11:10 AM. Reason: attach file

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: running count in horizontal row?

    The only way to do this is I know is with VBA. That would require you using a macro-enabled workbook. Is that OK?

    If so, let's clarify...every time you enter a value in column C, you want the value you enter to be added instantly to the value on the same row in column D? Deleting values from column C would have no effect on column D.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: running count in horizontal row?

    If yes, you're able to use macros, then use this.

    1) Right-click on the sheet-tab name and select VIEW CODE
    2) Paste this sheet-event macro into the window that appears:
    Please Login or Register  to view this content.
    3) Close the editor
    4) Save your sheet as a macro-enabled workbook (*.xlsm)

    Now make an entry in column C and the column D value will increment. There will be no formulas in column D when the macro has run once on every row.

  4. #4
    Registered User
    Join Date
    01-24-2010
    Location
    Tenneessee
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: running count in horizontal row?

    that worked perfect!!!! Thank you, I could have never done that myself. I am completely igonrant when it comes to Macro..... Is there anywhere I can learn to figure this stuff out myself or basically do I have to learn to write programs?

  5. #5
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: running count in horizontal row?

    I learned to write macros on forums like this solving problems one at a time, then later trying to answer other people's questions. Glad it works for you!

    If that takes care of your need, be sure to EDIT your original post, click Go Advanced and mark the PREFIX box [SOLVED].


    (Also, use the blue "scales" icon in our posts to leave Reputation Feedback, it is appreciated. It is found across from the "time" in each of our posts.)

+ 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