Solved

How to sum by date and type in Excel 2010

Posted on 2013-11-22
7
302 Views
Last Modified: 2013-11-23
We have a peculiar need where we haven't seemed it anywhere else.  We need to totalize by Date and Type (see excel attached).  We have placed the calculation individually by DATE and by TYPE. At the top of the excel is what we want (we sum it manually so EE can see what we want), by both DATE and TYPE.
0
Comment
Question by:rayluvs
  • 5
  • 2
7 Comments
 

Author Comment

by:rayluvs
ID: 39670921
forgot the excel.
AmtByDates-Type.xls
0
 
LVL 81

Accepted Solution

by:
byundt earned 500 total points
ID: 39670923
Try the following formula in cell F3. It may be copied across and down.
=SUMPRODUCT((MONTH($A$7:$A$28)=MONTH(F$2))*($B$7:$B$28=$E3),$C$7:$C$28)
0
 

Author Comment

by:rayluvs
ID: 39671370
Ok will try.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:rayluvs
ID: 39671375
Worked Perfectly!

Can you explain the formulas for us to better understand?
0
 
LVL 81

Assisted Solution

by:byundt
byundt earned 500 total points
ID: 39671414
The SUMPRODUCT function may be used to sum or count cells subject to certain criteria, with those criteria tested on a row by row basis. This use is not documented by Microsoft, but is widely used in the expert community in Excel forums. It also works in all versions of Excel, whereas the COUNTIFS and SUMIFS functions with similar abilities work only in Excel 2007 and later.

In this particular case, we have two criteria that have to be met: one for the date and another for the type. Each criteria is expressed as a Boolean expression. The Boolean expressions return an array of TRUE and FALSE values--but when you multiply them by each other (or by another number), Excel converts TRUE into 1 and FALSE into 0.

(MONTH($A$7:$A$28)=MONTH(F$2)    Boolean expression testing dates in column A to see if month matches the column header in F2

($B$7:$B$28=$E3)    Boolean expression testing type in column B to see if it matches that in cell E3

,$C$7:$C$28      the cells being summed if they match both of the preceding criteria. The comma before the expression allows SUMPRODUCT to tolerate (and ignore) text values, should any be present in column C. It could also be written with a leading asterisk if all values in column C are numeric--but SUMPRODUCT will return an error value if even one cell contains text.
*$C$7:$C$28

Note that if your dates in column A span more than one year, you will want to add a year criteria to the formula.
=SUMPRODUCT((MONTH($A$7:$A$28)=MONTH(F$2))*(YEAR($A$7:$A$28)=YEAR(F$2))*($B$7:$B$28=$E3),$C$7:$C$28)
0
 

Author Comment

by:rayluvs
ID: 39671435
Thanx a lot!
0
 

Author Closing Comment

by:rayluvs
ID: 39671436
Thanx!
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Improved? Move/Copy Add-in Replacement - How to avoid the annoying, “A formula or sheet you want to move or copy contains the name XXX, which already exists on the destination worksheet.” David Miller (dlmille)  It was one of those days… I wa…
Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
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.

679 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