+ Reply to Thread
Results 1 to 6 of 6

Formula for Sum if Date and criteria match

  1. #1
    Registered User
    Join Date
    12-06-2019
    Location
    Florida
    MS-Off Ver
    2016
    Posts
    14

    Formula for Sum if Date and criteria match

    I have an excel sheet that I need to have a formula reference a column of dates and another column of names and count how many are of each person. How would i set the formula up for that? I know i can count a specific person in one column but cant figure out how to reference two columns

    I attached a sample of the sheet


    Thank you!
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    03-05-2018
    Location
    Tbilisi, Georgia
    MS-Off Ver
    2013, 2016
    Posts
    273

    Re: Formula for Sum if Date and criteria match

    Please try:
    =SUMPRODUCT((YEAR($A$2:$A$500)=E$1)*($B$2:$B$500=$D2))
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    12-06-2019
    Location
    Florida
    MS-Off Ver
    2016
    Posts
    14

    Re: Formula for Sum if Date and criteria match

    That worked exactly like i needed it!

    Sorry to ask for more help! I submitted my question and then was told i needed more info after. I need it to also count another column as well based on the same criteria
    This would see the count of guy 1-3 and count them as well as add the total debit by person. Ex. Guy 1 has 5 payments of varying between 1-10$ so it would have the calculated sum of all just his debits. And then the sum of all persons for the whole year. I reattached the updated sheet with my question. If you can help again i really appreciate it!

    =IF(YEAR(A2:A500)=E2,SUMIF(B2:B500,"Guy 1",C2:C500)) This is what i tried but failed to come back with a number, so i am unsure where to go from here


    Thank you!




    Edit: Spelling Errors and addition
    Attached Files Attached Files
    Last edited by KarolSweats; 08-06-2021 at 11:55 PM.

  4. #4
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2024
    Posts
    6,177

    Re: Formula for Sum if Date and criteria match

    Try this:

    =SUMIFS($C$2:$C$500,$B$2:$B$500,G$1,$A$2:$A$500,">="&DATE($E2,1,1),$A$2:$A$500,"<"&DATE($E2+1,1,1))

  5. #5
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2019
    Posts
    4,542

    Re: Formula for Sum if Date and criteria match

    Or using SUMPRODUCT formula: =SUMPRODUCT(($C$2:$C$500)*(YEAR($A$2:$A$500)=$E2)*($B$2:$B$500=G$1))

    By the way, your COUNT formula (after transposing) should change to: SUMPRODUCT((YEAR($A$2:$A$500)=$E2)*($B$2:$B$500=G$1))

  6. #6
    Registered User
    Join Date
    12-06-2019
    Location
    Florida
    MS-Off Ver
    2016
    Posts
    14

    Re: Formula for Sum if Date and criteria match

    Both those formulas helped!

    Thank you!

+ 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] match criteria and return earliest date formula help
    By lilsnoop in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 11-12-2020, 04:33 PM
  2. [SOLVED] Index Match Formula with date and code as criteria
    By bubuweas in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-11-2019, 07:40 AM
  3. [SOLVED] Formula Needed to auto pop the # 1 in cell based on when date entered and match criteria
    By excelteam777 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-28-2017, 10:38 PM
  4. Date and Hour formula with criteria match
    By savetrees in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 08-22-2014, 08:07 AM
  5. [SOLVED] Index Match Based on One Date Criteria, Table Contains Beginning Date and End Date
    By jcox1953 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-09-2014, 02:41 PM
  6. [SOLVED] Index match formula to search for two criteria (date & name)
    By davechamp1983 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-17-2012, 10:00 PM
  7. [SOLVED] sumif formula for date and month with match criteria
    By alimamak in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 08-08-2012, 08:31 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