+ Reply to Thread
Results 1 to 7 of 7

Sum Values on Sheet with Multiple Rows of Headers

  1. #1
    Registered User
    Join Date
    02-14-2012
    Location
    Cincinnati, Ohio
    MS-Off Ver
    Excel 2003
    Posts
    18

    Sum Values on Sheet with Multiple Rows of Headers

    Information on Sheet1

    Header1;Header2;Header3
    11;12;13
    Header1;Header2;Header3
    21;22;23
    Header1;Header2;Header3
    31;32;33

    There will be more sets of this same data added to the sheet on a weekly basis. Every time there is a new set of this data, I want to sum it.
    _________________________________
    Desired Result in Separate "Totals" Area (or Sheet):

    Header1;Header2;Header3
    63;66;69

    (I would not have set up the information needing to be totalled in this way. I would have set up the information needing to be totalled in a way that would have been easy to total. I thank you in advance for your time and consideration. And, for what it's worth, I never take credit for these sorts of things I can't figure out on my own. I always let them know from where I got it. )
    Attached Files Attached Files
    Last edited by chrisboughter; 08-31-2015 at 10:37 AM.

  2. #2
    Forum Contributor
    Join Date
    11-04-2012
    Location
    Czech Republic
    MS-Off Ver
    MS 365
    Posts
    267

    Re: Sum Values on Sheet with Multiple Rows of Headers

    Hi Chris

    but if you try the normal sum a reference it to the whole column as follow, this would work :-)

    For Header 1.
    =SUM(A:A)

    Andy :-)

  3. #3
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Sum Values on Sheet with Multiple Rows of Headers

    Something like this

    =SUMPRODUCT(--(A1:A500="Header1"),(A2:A501))
    ?
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  4. #4
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Sum Values on Sheet with Multiple Rows of Headers

    I'm going to assume that the headers could be mixed in the columns, i.e. header3 could also appear in column A, in which case, try this one,

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    This must be confirmed as an array with Shift Ctrl and Enter.

  5. #5
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Sum Values on Sheet with Multiple Rows of Headers

    If what Jason says is true (that Header1 can appear in columns A:C), then

    =SUMPRODUCT(--(A1:C500="Header1"),(A2:C501))

  6. #6
    Registered User
    Join Date
    02-14-2012
    Location
    Cincinnati, Ohio
    MS-Off Ver
    Excel 2003
    Posts
    18

    Re: Sum Values on Sheet with Multiple Rows of Headers

    OK, WOW!!! Thanks to all. Because there is additional data in the columns, other than data directly below the headers, unlike in my example (sorry for not making that clear), the SUM solution will not work for my specifice application, but, dobracik, I thank you for your time and your reply.

    I tried the SUMPRODUCT solution and this works perfectly!!! My only experience with SUMPRODUCT is when used with the Solver tool. I will have to experiment with this function more to understand it better. I appriate the responses.

    I am shying away from the SUM/INDEX/MATCH CSE solution, for now, but only due to the fact that I currently do not have time to delve into it. I will certainly give it a try when time permits and work to understand these functions, so, jason.b75, your reply will not go unused and I thank you for your time.

  7. #7
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Sum Values on Sheet with Multiple Rows of Headers

    Hi Chris, just to make it a little easier for you to understand how it works.

    Using SUM with CSE is effectively the same as using SUMPRODUCT. The INDEX / MATCH part was purely to make the formula dynamic, in the sense that you don't need to specify where the last row of data is, the formula will find the last header and base the range on that.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 0
    Last Post: 09-11-2013, 09:54 AM
  2. [SOLVED] Assign single number to duplicate values according to a column
    By DonAx in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 07-18-2013, 04:45 AM
  3. [SOLVED] Return Column Headers based on row rank with duplicate values in row
    By carlwin in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-31-2013, 12:24 AM
  4. [SOLVED] Need Urgent help on Adjacent values of Duplicate column values should be be in single row.
    By anto_01 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-11-2012, 09:55 PM
  5. VBA code to delete duplicate values in a single Row
    By ragavendraph in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-25-2012, 09:19 AM
  6. Replies: 1
    Last Post: 04-19-2012, 11:43 AM
  7. Replies: 2
    Last Post: 02-20-2012, 06:06 PM
  8. [SOLVED] Finding Duplicate values within a single column
    By Ed P in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-16-2005, 07:06 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