+ Reply to Thread
Results 1 to 5 of 5

Sum multiple columns with same header

  1. #1
    Registered User
    Join Date
    05-22-2019
    Location
    london
    MS-Off Ver
    Office 365
    Posts
    85

    Sum multiple columns with same header

    Hi. Can anyone tell me why my formula isn't working? I'm trying to sum multiple columns with the same header but its only summing the first column.

    =SUM(INDEX(O12:U12,1,MATCH($O$4,$O$4:$U$4,0)))

    O4 is the highlighted column header i want to match.

    As you can see from the result. I'm only getting 0.5 and I want to see the value of 1.

    Can't think why its not including the multiple columns.


    Example.JPG
    Last edited by AliGW; 11-30-2021 at 08:59 AM. Reason: Redacted for legibility.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,448

    Re: Sum multiple columns with same header

    There are instructions at the top of the page explaining how to attach your sample workbook.

    A good sample workbook has just 10-20 rows of representative that has been desensitised. It also has expected results mocked up, relevant cells highlighted and a few explanatory notes.

    Administrative Note:

    Members will tailor the solutions they offer to the version of Office (Excel) that you have. Please check that your forum profile is up-to-date in this respect. If you aren't sure, in Excel go to File | Account and report what it says below the MS logo at the top of that page. If your version is for Mac, please also state this. Thanks.

    You could try this, although I doubt it's what you really need:

    =SUMIFS(O12:U12,$O$4:$U$4,$O$4)
    Last edited by AliGW; 11-30-2021 at 09:01 AM.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,366

    Re: Sum multiple columns with same header

    MATCH only finds the first occurrence of the search parameter

    try

    =SUMPRODUCT(($O12:$U12)*($O$4:$U$4=$O$4))
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  4. #4
    Registered User
    Join Date
    05-22-2019
    Location
    london
    MS-Off Ver
    Office 365
    Posts
    85

    Re: Sum multiple columns with same header

    Perfect thank you everyone.

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,448

    Re: Sum multiple columns with same header

    If you have not already done so, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of all those who offered help.

+ 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. [SOLVED] Delete Multiple Columns based on Header Name
    By kingsdime29x in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-13-2019, 04:07 AM
  2. [SOLVED] Compare multiple columns and return header value
    By sarajun_88 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-09-2017, 10:27 PM
  3. How to move multiple columns based on header name Help Needed!
    By AkAk0 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-26-2016, 01:43 PM
  4. Sum multiple columns based on month header
    By pphg in forum Excel General
    Replies: 3
    Last Post: 04-21-2016, 03:52 AM
  5. Split multiple Delimiter field with Header into Multiple Columns and Rows
    By omershafiq2012 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-27-2015, 08:01 AM
  6. Sum multiple columns based on header
    By towndrunk in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 08-14-2013, 10:00 AM
  7. Replies: 2
    Last Post: 10-13-2012, 03:30 AM

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