Closed Thread
Results 1 to 5 of 5

Running Total Formula in a Single Cell

  1. #1
    Registered User
    Join Date
    03-27-2014
    Location
    phoenix, az
    MS-Off Ver
    Excel 2010
    Posts
    15

    Exclamation Running Total Formula in a Single Cell

    I am creating a spreadsheet for inventory use. I want to have a running total in (1) cell based upon a new/different number being entered into a different cell.

    Column B, Row 1 (This will be a new/different number entered every day - inventory in or out, so positive or negative number)
    Column D, Row 1 (This will be a running total based on numbers inserted in previous 2 columns)

    Basically what I have is a key inventory. So there is column A with key number, B should be keys IN, C should be keys OUT, or ideally B would be IN and OUT meaning, for inventory IN input a positive number and for inventory OUT input a negative number, and D Should be total.

    Column E represents number of keys currently in the inventory. I was going to hide the current inventory column so all you see is IN/OUT and total.
    So what I need is to be able to just come in and type in a number in the IN and/or OUT column, without having to add/subtract it with the number already in that column.

    Bottom line, I’d like to be able to use IN and/or OUT columns to just type in numbers as they come and not have to worry about what’s already in those columns and get correct total number.

    Can someone please help me with this?

    Thanks!


    Ok here it is. Attached worksheet shows
    Column A - Key Numbers...No data value
    Column B - Inventory IN
    Column C - Inventory OUT
    Column D - Total
    Column E - Current Inventory(Starting point)

    So the formula I used to get what i currently have is (=B2-C2+E2). This way whatever i input in columns C and C. totals out in D. But this way every time I want to add/subtract a number in B and C, i have to add to the number already in the column. I'd like to be able to type in a number in B and C as i go and still have a correct total. I wouldn't mind having just one column for in/out and use positive and negative numbers to differentiate inventory in or out.

    I hope this makes sense. Thanks

    Key Inventory - Test.xlsx

  2. #2
    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
    44,339

    Re: Running Total Formula in a Single Cell

    You can't do that with a formula. You'd need VBA ... specifically, a Worksheet Change event monitoring cells B2 and C2. This would add any changes in those cells and add them to the value in D2.

    This question is not in the programming forum, nor does it ask for a VBA solution, hence it has not been offered.


    Regards, TMS
    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


  3. #3
    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
    44,339

    Re: Running Total Formula in a Single Cell

    Duplicate thread: http://www.excelforum.com/excel-prog...-vba-help.html


    Welcome to the Forum, unfortunately:

    This is a duplicate post and as such does not comply with Rule 5 of our forum rules.
    Last edited by TMS; 04-10-2014 at 06:50 PM.

  4. #4
    Registered User
    Join Date
    05-18-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Running Total Formula in a Single Cell

    I rearranged your spreadsheet a little bit so it made more chronological sense to me. I then added a macro as TMS suggested. It's really simple. Just click the button at the beginning of each day before you add the inventory changes and it should update correctly.

    Not trying to criticize your technique, but might make more sense to keep a running log of inventory changes as it easier to track if there's a mistake. Good luck.
    Attached Files Attached Files

  5. #5
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Running Total Formula in a Single Cell

    Welcome to the Forum, unfortunately:

    This is a duplicate post and as such does not comply with Rule 5 of our forum rules. This thread will now be closed, you may continue in your other thread.

    Thread Closed.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

Closed Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. keeping a running total in a single cell
    By shrtdawg73 in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 08-11-2015, 01:55 AM
  2. Running Total Formula in a Single Cell
    By jelenahelp in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-11-2014, 01:24 AM
  3. Formula for gain and loss within a column with a single cell running total
    By unusually_usual in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-11-2011, 10:22 AM
  4. Keeping and adding a running total in a single cell, not working the way I want.
    By jlg371 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-02-2009, 06:16 PM
  5. Adding and keeping a running total in a single cell
    By jlg371 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-02-2009, 12:36 PM

Tags for this Thread

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