+ Reply to Thread
Results 1 to 6 of 6

Running Totals for Descriptive Cells

Hybrid View

  1. #1
    Registered User
    Join Date
    12-04-2012
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    4

    Running Totals for Descriptive Cells

    I am trying to total gallon usage across different states. When the driver leaves 1 state and goes into another I want them to make note of that but then I want them to total for each state in a different box. See below and it may make things clearer.

    STATE Gallons Date AL GA
    AL 25
    GA 32
    AL 25


    Here the driver has driven in AL then GA then again in AL. AL should read 50, and GA should read 32.

    Any ideas???

  2. #2
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: Running Totals for Descriptive Cells

    Try

    =SUMIF(A:A,$A2,B:B)

  3. #3
    Registered User
    Join Date
    12-04-2012
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Running Totals for Descriptive Cells

    Thanks Bob!

    I had to change it a bit

    =SUMIF(A3:A10,$A3:A10,B3:B10)

    but only because of formatting.

    I expect a few more problems with trying to get all of the different states to work, but thanks for getting me pointed in the right direction!

  4. #4
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: Running Totals for Descriptive Cells

    If you will be testing many states, you should fix the ranges. And the middle argument should be a single cell

    =SUMIF($A$3:$A$10,$A3,$B$3:$B$10)

  5. #5
    Registered User
    Join Date
    12-04-2012
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Running Totals for Descriptive Cells

    Sorry I'm a dufus. I just had to switch the Criteria reference

  6. #6
    Registered User
    Join Date
    12-04-2012
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Running Totals for Descriptive Cells

    STATE Gallons Date AL AK
    AL 12 25 25
    AK 2
    AL 13
    AK 5
    --


    This is what I'm getting so far. I realize it might be because of the extra 'date' column

+ 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