+ Reply to Thread
Results 1 to 5 of 5

Running total in one cell depending on input from another cell

  1. #1
    Registered User
    Join Date
    03-20-2008
    MS-Off Ver
    2003
    Posts
    17

    Running total in one cell depending on input from another cell

    this is what i am looking at doing...

    if cell A1:infinite has a one in it then add the corresponding B column to the total in c

    so if A1 has a one and A3 has a one then B1 and B3 should being added to the running total for C

    However if A1 has a two then add to D so on and so on...is this doable
    Last edited by cojast; 06-30-2008 at 03:53 PM.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678
    Yes, it is readily doable.

    Please read the Forum Rules about thread titles, and then edit your thread title to be descriptive of your problem, and I or someone else will explain how.

  3. #3
    Registered User
    Join Date
    03-20-2008
    MS-Off Ver
    2003
    Posts
    17
    Let me see if i can clear up what i was saying...

    IF the number 2 shows up in any row of column A then i would like the corresponding row of column B to be added to D1..this needs to be a running total.

    The number 2 should show up mulitple times in column A...think of it as a number assigned to an employee...and B is their hours worked.

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678
    Assuming row 1 is a header, then hide row 2.

    A3 and B3 and down are data entry

    In C3 and copy down, =c2 + if(a3 = 1, b3, 0)

    In D3 and copy down, =d2 + if(a3 = 2, b3, 0)

  5. #5
    Registered User
    Join Date
    03-20-2008
    MS-Off Ver
    2003
    Posts
    17
    shg- thank you for the code.

    Now that i see it working i relized i explained it wrong...
    Column A and B are fine, however column C just needs to show the final total not all the totals for each line. I only want C3 to show the total for employee 1, D3 to show the total for employee 2, and so on.
    I would like to not use C4, C5, C6, C7, C8, etc.

    Is this possible

+ 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