Solved

SUMIF with a date criteria as well

Posted on 2011-09-24
2
567 Views
Last Modified: 2012-05-12
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
Comment
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
  • Learn & ask questions
2 Comments
 
LVL 50

Accepted Solution

by:
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

by:Lee Osborne
ID: 36592185
Perfect, thanks very much!

I really should learn more about pivot tables, they really are good!

Lee
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question