+ Reply to Thread
Results 1 to 7 of 7

Sum columns based on column headings

  1. #1
    Registered User
    Join Date
    06-27-2012
    Location
    Birmingham, England
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    6

    Exclamation Sum columns based on column headings

    Hi

    Please can someone help.

    Im trying to sum columns based on the column headings. Please see example below.

    The data needs to stay in this format and I only want totals for the columns without "R", ie the ones listed to the right.
    The column headings do also repeat several times.

    Please see attached.

    Your help would be much appreciated.


    <1100> <1100R> <1018> <1018R> <1019> <1019R> <2005> <2005R> <1100> <1100R> <2005> <2005R>
    4 5 9 2 3 4 2 7 2 3 6 9
    5 4 5 9 2 3 4 2 7 2 3 6
    4 5 9 2 3 4 2 7 2 3 6 9
    9 2 3 4 2 7 2 3 6 9 1 7
    5 4 5 9 2 3 4 2 7 2 3 6
    4 5 9 2 3 4 2 7 2 3 6 9
    9 2 3 4 2 7 2 3 6 9 1 8
    4 5 9 2 3 4 2 7 2 3 6 9
    9 2 3 4 2 7 2 3 6 9 1 2
    5 4 5 9 2 3 4 2 7 2 3 6
    9 2 3 4 2 7 2 3 6 9 1 2
    5 4 5 9 2 3 4 2 7 2 3 6

    TOTAL
    <1100> X
    <1018> X
    <1019> X
    <2005> X
    Attached Files Attached Files
    Last edited by Jario; 06-28-2012 at 08:50 AM.

  2. #2
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Sum columns based on column headings

    Please upload a sample worksheet. The text above is all garbled.
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  3. #3
    Registered User
    Join Date
    06-27-2012
    Location
    Birmingham, England
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    6

    Re: Sum columns based on column headings

    Please see attached file.

    Can anyone solve this problem?

  4. #4
    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 column headings

    like this maybe
    Attached Files Attached Files
    "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

  5. #5
    Registered User
    Join Date
    06-27-2012
    Location
    Birmingham, England
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    6

    Re: Sum columns based on column headings

    Hi martindwilson

    Thank you for your responce.

    As per solution I would need <1100> total to be 132 and <2005> to be 72.

    I just need one total per column heading.

    Thank you for your assistance.

    Jario

  6. #6
    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 column headings

    thats not what you asked in the original is it? that's easier
    =SUMPRODUCT(($B$3:$M$3=P5)*$B$4:$M$15) where p5 =<1100> gives total of 132
    Last edited by martindwilson; 06-28-2012 at 11:10 AM.

  7. #7
    Registered User
    Join Date
    06-27-2012
    Location
    Birmingham, England
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    6

    Re: Sum columns based on column headings

    Hi Martin

    Thank you, it worked a treat.

    Apologies for my bad explanation.

    Thanks again

+ 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