+ Reply to Thread
Results 1 to 7 of 7

sum values in multiple columns if criteria is the same

  1. #1
    Registered User
    Join Date
    04-22-2016
    Location
    Belgium
    MS-Off Ver
    2010
    Posts
    22

    sum values in multiple columns if criteria is the same

    I attach an example and the explanation.
    Basically i have a workbook with, 52 sheets, one per week. within the week table, each day is composed of three columns: quantity, type, name (so 7 days *3 columns)
    I want to sum the "quantities" of the week for each "name" (each name is in a list of names)
    I'm using sumifs but it's very long. Is there a way to make the formula shorter (I will have to use it in each sheet and in a summary sheet)
    (please not macros)

    =SUMIFS(B:B;D:D;"="&X2)+SUMIFS(E:E;G:G;"="&X2)+SUMIFS(H:H;J:J;"="&X2)+SUMIFS(K:K;M:M;"="&X2)+SUMIFS(N:N;P:P;"="&X2)+SUMIFS(Q:Q;S:S;"="&X2)+SUMIFS(T:T;V:V;"="&X2)

    thank you
    Attached Files Attached Files

  2. #2
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: sum values in multiple columns if criteria is the same

    Try

    =SUMIF($D:$V,X2,$B:$T)

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,039

    Re: sum values in multiple columns if criteria is the same

    Maybe =sumif(criteria-range, criteria, sum range)

    edit: I need to refresh more often, Jonmo beat me to it
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: sum values in multiple columns if criteria is the same

    Although you asked not for a VBA solution I changed the format of your file.

    Using this format it is easy to generate a table.

    After that it is easy to analyze the data (e.g. with a pivot table).

    You find the pivot table in the file.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  5. #5
    Registered User
    Join Date
    04-22-2016
    Location
    Belgium
    MS-Off Ver
    2010
    Posts
    22

    Re: sum values in multiple columns if criteria is the same

    Thanks a lot Jonmo1 and FDibbins. Works perfect.
    the solution of oeldere is good, though macros here are problematic due to security policy. that's why I don't use them. but Thanks anyway. Dank U.

  6. #6
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: sum values in multiple columns if criteria is the same

    Thanks for the rep.

    You're welcome. We appreciate the feedback!

  7. #7
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,039

    Re: sum values in multiple columns if criteria is the same

    Thanks for the feedback

+ 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. Sum values based on multiple criteria in rows and columns
    By mattadler22 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-20-2015, 03:09 AM
  2. Lookup using multiple criteria- values are in different columns
    By Shareez Saleem in forum Excel General
    Replies: 4
    Last Post: 05-11-2015, 10:18 PM
  3. [SOLVED] Sum if based on two criteria and values in multiple rows and columns
    By Alkina in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-15-2013, 09:18 AM
  4. [SOLVED] Copy/Paste multiple columns as values based on another columns criteria
    By Dgp2012 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-28-2013, 06:50 AM
  5. Replies: 6
    Last Post: 11-07-2012, 11:18 AM
  6. Count unique values across 2 columns with multiple criteria
    By Skywalker01 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-29-2012, 08:04 AM
  7. Replies: 2
    Last Post: 10-05-2011, 12:43 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