+ Reply to Thread
Results 1 to 6 of 6

Formula to sum column with multi criteria in other columns

  1. #1
    Registered User
    Join Date
    10-04-2018
    Location
    Cancun, Mexico
    MS-Off Ver
    2013 & 2016 32b
    Posts
    78

    Formula to sum column with multi criteria in other columns

    On Worksheet Daten_CIE ,I have some Raw data.

    On Worksheet KW 01 Dedicated (cell: O3), I like to put the formula,

    this formula should only sum col E from Worksheet Daten_CIE, if meets some criteria:

    1. In Col A if "GEV 0192624"

    2.in Col C if "00:00, 00:30 and 01:00"

    i have added the workbook

    test.xlsx

    Thank you

  2. #2
    Registered User
    Join Date
    01-13-2021
    Location
    Edinburgh, Scotland
    MS-Off Ver
    2019
    Posts
    2

    Re: Formula to sum column with multi criteria in other columns

    Because of the "Or" requirement for column C, the formula needs to be structured as a sum if. I've converted the Daten_CIE data to an excel table CTRL + T for ease of reference. I'd recommend storing the times required for the condition in hiddn cells in the "Dedicated" page against each time bucket. Also be careful of counting twice, for example 00:00 and 01:00 in the same time bucket.

    =SUMPRODUCT((Table1[totNIncomeLT])*(Table1[Thema]="GEV 0192624")*((Table1[von]="00:00")+(Table1[von]="00:30")+(Table1[von]="01:00")))

    edit: Glenn's is the cleaner solution.
    Attached Files Attached Files
    Last edited by AndyExcels; 01-18-2021 at 05:52 AM. Reason: trying to attach file

  3. #3
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,072

    Re: Formula to sum column with multi criteria in other columns

    Or...

    Separate von and bis into separate columns. Format as [h]:mm

    Convert the text-times in CIE.... to real times: Select column C. Data/Text to columns/Finish. Repeat for column D.

    Then use:

    =SUMIFS(Daten_CIE!E:E,Daten_CIE!A:A,"GEV 0192624",Daten_CIE!C:C,">="&N3,Daten_CIE!D:D,"<"&O3)

    Copy down the column.

    There is a logical inconsistency in your requirement. If in the first row you count 0:00 0:30 and 01:00, what do you count in the second?? 01:00 again?? or what. In my suggestion, you count 0:00 to0:059:59 in the first row; 01:00 to 01:59:59 in the second, etc.
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: Lá fhéile Pádraig sona dhaoibh

  4. #4
    Registered User
    Join Date
    10-04-2018
    Location
    Cancun, Mexico
    MS-Off Ver
    2013 & 2016 32b
    Posts
    78

    Re: Formula to sum column with multi criteria in other columns

    Thank you AndyExcels and Glenn Kennedy,

    this is working excellent , one question :

    how do i add an other criteria to the first part

    ((Table1[totNIncomeLT])*(Table1[Thema]="GEV 0192624 and GEV Inland") ?

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,072

    Re: Formula to sum column with multi criteria in other columns

    Like this:

    =SUM(SUMIFS(Daten_CIE!E:E,Daten_CIE!A:A,{"GEV 0192624","GEV Inland"},Daten_CIE!C:C,">="&N3,Daten_CIE!D:D,"<"&O3))

    You're welcome.



    It would be very nice if you were to just click the Add Reputation button at the foot of any of the posts of members who helped you reach a solution.

    Finally, if that takes care of your original question, please select "Thread Tools" from the menu link above and mark this thread as SOLVED.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    01-13-2021
    Location
    Edinburgh, Scotland
    MS-Off Ver
    2019
    Posts
    2

    Re: Formula to sum column with multi criteria in other columns

    Answered by Glenn for his method, which is the one I'd suggest going with.

    If going with my initial submission earlier, the multiplications are effectively the same as "AND", whilst the additions inside the parenthesis is effectively an OR statement.

    So orginal,

    SUMPRODUCT((Table1[totNIncomeLT])*(Table1[Thema]="GEV 0192624")*((Table1[von]="00:00")+(Table1[von]="00:30")+(Table1[von]="01:00")))

    becomes

    SUMPRODUCT((Table1[totNIncomeLT])*((Table1[Thema]="GEV 0192624")+(Table1[Thema]="GEV Inland")) *(Table1[)*((Table1[von]="00:00")+(Table1[von]="00:30")+(Table1[von]="01:00")))

    I'm assuming it's an OR, rather than a AND needed as the column seems to be one or the other.

+ 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] Regular formula or array for multi colum multi criteria?
    By scaffdog845 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-25-2016, 01:40 PM
  2. Countif with multi criteria in one column
    By chavez000 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-17-2014, 03:16 AM
  3. Replies: 0
    Last Post: 01-14-2014, 06:35 PM
  4. 1 column into multi-columns and multi-rows
    By affj in forum Excel General
    Replies: 7
    Last Post: 07-17-2013, 09:34 AM
  5. Sum if array formula, with multi criteria, some in the same column
    By carlosmaldonado in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-12-2012, 04:30 AM
  6. Sum with Multi Criteria in Multi Column
    By markuss in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 03-01-2010, 05:35 PM
  7. Replies: 6
    Last Post: 02-27-2009, 02:47 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