+ Reply to Thread
Results 1 to 3 of 3

Sum of cells based on different column

  1. #1
    Registered User
    Join Date
    06-01-2010
    Location
    MA, USA
    MS-Off Ver
    Excel 2013
    Posts
    18

    Sum of cells based on different column

    I have the following data:

    PHP Code: 
    Transaction Amount
    Buy         200
    Buy         100
    Sell        200 
    I want to track the running balance in another cell like this:

    "# Buys" = '=COUNTIF(B:B,"Buy")'
    "# Sells" = '=COUNTIF(B:B,"Sell")'
    "Buys" = 'sum of all "cells of C" where "B = 'Buy'"'
    "Sells" = 'sum of all "cells of C" where "B = 'Sell'"'

    How do I do the last two formulas?
    Last edited by DrStrangepork; 08-18-2011 at 02:44 PM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Sum of cells based on different column

    use Sumif

    e.g.

    =SUMIF(B:B,"Buy",C:C)

    and

    =SUMIF(B:B,"Sell",C:C)
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    06-01-2010
    Location
    MA, USA
    MS-Off Ver
    Excel 2013
    Posts
    18

    Re: Sum of cells based on different column

    Quote Originally Posted by NBVC View Post
    =SUMIF(B:B,"Buy",C:C)

    and

    =SUMIF(B:B,"Sell",C:C)
    That was it! Thank you.

+ 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