+ Reply to Thread
Results 1 to 5 of 5

Sum columns based on header cell

  1. #1
    Forum Contributor
    Join Date
    12-16-2004
    Posts
    125

    Sum columns based on header cell

    Hello,

    I am a teacher and use excel to do grades. One of the sheets I made contains a column for every grade for the semester. Grades are weighted and assigned per weighting category. What I want to do is sum each category grade into one column. There can be a total of 10 categories and the categories are arranged by date which means I need a formula that looks up each column based on the category and adds them together. There is also one more obstacle. If a student is excused from the assignment there is an "x" instead of a score. I need this to not affect the calculation. Does anyone know how I can do this? I have attached a sample worksheet. B4:U63 are the scores and I need the formula in Z4:AJ63.

    Thanks for any help.
    Attached Files Attached Files

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Sum columns based on header cell

    give an example of the total you want for one or two of them i cant see where you get totals from b4:u4=1443 but you have 568 in v4 what's that the total of?
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Forum Contributor
    Join Date
    12-16-2004
    Posts
    125

    Re: Sum columns based on header cell

    Sorry about the mix up. Colun V, W & X used to total all scores but I will be replacing those columns with z through aj. What I want now is to have column z total only those from category "Fit."

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

    Re: Sum columns based on header cell

    Do you mean in Z4:

    =SUMIF($B$2:$U$2,Z$2,$B4:$U4)

    copied down and across the matrix?
    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.

  5. #5
    Forum Contributor
    Join Date
    12-16-2004
    Posts
    125

    Re: Sum columns based on header cell

    Thanks, that worked great.

+ 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