+ Reply to Thread
Results 1 to 5 of 5

Counting/Summing rows based off of two different criteria

  1. #1
    Registered User
    Join Date
    06-30-2016
    Location
    Oaks, PA
    MS-Off Ver
    Excel 2013
    Posts
    80

    Counting/Summing rows based off of two different criteria

    Hello,

    I'm looking for a formula that will count/sum up data in columns based off of the day of the week and what type is associated with an ID Number. The formula should count how many ID Numbers happened during a specific week day and separate the count by which type the ID Number is associated with.

    I attached my Excel file to better display the end result that I am looking for.
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Counting/Summing rows based off of two different criteria

    It's a little tricky because you have merged cells for TYPE 1 and TYPE 2 but in G4

    =COUNTIFS($A$2:$A$19, $F4,$B$2:$B$19, RIGHT(G$2,1)) copied down

    In H4

    =SUMIFS($D$2:$D$19,$A$2:$A$19, $F4,$B$2:$B$19, RIGHT(G$2,1)) copied down
    Attached Files Attached Files
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Registered User
    Join Date
    06-30-2016
    Location
    Oaks, PA
    MS-Off Ver
    Excel 2013
    Posts
    80

    Re: Counting/Summing rows based off of two different criteria

    Quote Originally Posted by ChemistB View Post
    It's a little tricky because you have merged cells for TYPE 1 and TYPE 2 but in G4

    =COUNTIFS($A$2:$A$19, $F4,$B$2:$B$19, RIGHT(G$2,1)) copied down

    In H4

    =SUMIFS($D$2:$D$19,$A$2:$A$19, $F4,$B$2:$B$19, RIGHT(G$2,1)) copied down
    If the Type field is both variables and a number, how would I adjust the formulas to match that? (I attached an Excel file with the updated Type column). Would using an index/match formula be better?
    Attached Files Attached Files

  4. #4
    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,169

    Re: Counting/Summing rows based off of two different criteria

    Try

    =COUNTIFS($A$2:$A$19,$F4,$B$2:$B$19,G$2)

    Replace RIGHT(G$2) with G$2

  5. #5
    Registered User
    Join Date
    06-30-2016
    Location
    Oaks, PA
    MS-Off Ver
    Excel 2013
    Posts
    80

    Re: Counting/Summing rows based off of two different criteria

    Thank you both of you!! The formula is doing exactly what I need it to do!

+ 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. summing data based on criteria on multiple rows and columns
    By Andy N in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-09-2017, 03:07 PM
  2. [SOLVED] Problem Summing/Counting Entries Based on Multiple Criteria
    By fearonc in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-14-2014, 02:40 PM
  3. Counting rows based on multiple criteria
    By PartisanStar in forum Excel General
    Replies: 8
    Last Post: 08-28-2014, 02:59 AM
  4. [SOLVED] Counting a sample (rows in a column) based on two criteria
    By Lija in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-08-2013, 10:17 AM
  5. Counting rows based on different criteria
    By pethaa1791 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 10-28-2008, 06:02 PM
  6. Summing rows based on criteria in another column
    By reybie in forum Excel General
    Replies: 2
    Last Post: 07-11-2006, 02:15 PM
  7. Counting & Summing based on criteria on another column
    By Chicago D in forum Excel General
    Replies: 2
    Last Post: 08-25-2005, 02:05 PM

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