+ Reply to Thread
Results 1 to 5 of 5

get total values based on category

  1. #1
    Forum Contributor
    Join Date
    08-07-2008
    Location
    United States
    MS-Off Ver
    Microsoft Office 2003
    Posts
    362

    get total values based on category

    hi,

    how can i get the total value based on category? I have enclosed a sample file...

    thanks,

    stoey
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    05-08-2012
    Location
    Georgia, USA
    MS-Off Ver
    Excel 2003, 2010
    Posts
    811

    Re: get total values based on category

    The formula you need is SUMIF

    Assume:
    A3:A35 Category Range
    G3 = Category, ie A, B, C, D and E
    B3:B35 and C3:C35 Range of values to be summed

    Then the formula for H3 is:
    =SUMIF($A$3:$A$35,G3,$B$3:$B$35)+SUMIF($A$3:$A$35,G3,$C$3:$C$35)

    Copy the formula down

    Example: Look in range A3:A35 for category "A"
    If there is a match, sum the values in ranges B$3:$B$35 and $C$3:$C$35
    Last edited by K m; 08-28-2012 at 12:54 PM.
    Click on star (*) below if this helps

  3. #3
    Forum Contributor
    Join Date
    08-07-2008
    Location
    United States
    MS-Off Ver
    Microsoft Office 2003
    Posts
    362

    Re: get total values based on category

    wow thanks KM... yeah it worked well but will this also work if say I would only get the value of column B based on my sample by using the formula?:

    =SUMIF($A$3:$A$35,G3,$B$3:$B$35)

  4. #4
    Valued Forum Contributor
    Join Date
    05-08-2012
    Location
    Georgia, USA
    MS-Off Ver
    Excel 2003, 2010
    Posts
    811

    Re: get total values based on category

    Not sure what you're asking but yes it should work.

    I amended my response, see if you understand it after reading the new response

    ---------- Post added at 01:03 PM ---------- Previous post was at 12:57 PM ----------

    This formula sums only column B

    =SUMIF($A$3:$A$35,G3,$B$3:$B$35)

    ========================================
    This formula sums only column C

    =SUMIF($A$3:$A$35,G3,$c$3:$c$35)[COLOR="Silver"]

    ---------- Post added at 01:04 PM ---------- Previous post was at 01:03 PM ----------



    Be sure to change the title as [SOLVED] is this answers your question. Be sure to click on the star at the bottom of this post

  5. #5
    Forum Contributor
    Join Date
    08-07-2008
    Location
    United States
    MS-Off Ver
    Microsoft Office 2003
    Posts
    362

    Re: get total values based on category

    well i tried =SUMIF($A$3:$A$35,G3,$B$3:$B$35) and it didn't work...the values on column based on the category were not added...

    sorry if i sounded confusing...the formula you gave me will provide the total sum from both column B and C based on the category...i tried getting the sum from column B only...

    ---------- Post added at 12:10 PM ---------- Previous post was at 12:08 PM ----------

    well i tried =SUMIF($A$3:$A$35,G3,$B$3:$B$35) and it didn't work...the values on column based on the category were not added...

    sorry if i sounded confusing...the formula you gave me will provide the total sum from both column B and C based on the category...i tried getting the sum from column B only...

    ---------- Post added at 12:13 PM ---------- Previous post was at 12:10 PM ----------

    thanks KM this thread is solved...

+ 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