Solved

# SUMIF with a date criteria as well

Posted on 2011-09-24
571 Views
I have a simple SUMIF which totals a column of cells based on a matching name:

Sheet2!B3     =SUMIF(Sheet1!A:A,A3,Sheet1!D:D)

This is for training courses which have a 'Course Date' (Sheet1!E:E) date cell. Sheet2!B1:M1 contains a heading of Months.

I need the SUMIF to total the values in Sheet1!D:D but also, only if the course date matches the same month as the heading in Sheet2!B1:B12.

I hope this, and the attached example spreadsheet (Excel 2003), makes some sense! So far I've tried SUMPRODUCT, SUMIF's, IF's and AND's, INDEX and MATCH, and I'm sure I've almost been there, but I can't find the right combination!

Thanks,
Lee

EE-Example.xls
0
Question by:Lee Osborne
[X]
###### Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

• Help others & share knowledge
• Earn cash & points

LVL 50

Accepted Solution

Ingeborg Hawighorst (Microsoft MVP / EE MVE) earned 500 total points
ID: 36592118
Hello,

you could do a pivot table with just a few clicks, or use sumproduct

=SUMPRODUCT(--(Sheet1!\$A\$2:\$A\$20=Sheet2!\$A3),--(DATE(YEAR(Sheet1!\$E\$2:\$E\$20),MONTH(Sheet1!\$E\$2:\$E\$20),1)=Sheet2!B\$1),Sheet1!\$D\$2:\$D\$20)

Attached is the sumproduct formula in action and a pivot table on Sheet3

cheers, teylyn
EE-Example.xls
0

LVL 15

Author Comment

ID: 36592185
Perfect, thanks very much!

Lee
0

## Featured Post

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Workbook link problems after copying tabs to a new workbook? David Miller (dlmille) Intro Have you either copied sheets to a new workbook, and after having saved and opened that workbook, you find that there are links back to the original souâ€¦
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.
###### Suggested Courses
Course of the Month3 days, 16 hours left to enroll