I've been struggling with this problem for 3 days now and I'm desperate. I know it's something simple that I just don't know yet. Hope someone here knows how to do this stuff.
I have a sales sheet for one of my classes that I'm trying to add a sum if statement too. The dilema is that there are 3 criteria that must be met for for it to sum what I want. I want it to differentiate according to the product (T-shirt), type of purchase (credit), and by the date.
I got it all down except for the date.
This is what I have so far:
=SUM(IF(DATEVALUE(10/12/2009)<A:A<DATEVALUE(10/16/2009),IF(F:F=("T-Shirt),IF(C:C=("credit"),D:D))))
I want the values in row D to be added together if row A is inbetween date 10/12/2009-10/16/2009 and the value of row C is "credit", and the value of row F is "T-shirt". If any value in the criterion is not met then I want it to disavow the colum. If you delete the date part it works just fine.
I've attached the file. What am I doing wrong?
Thanks ahead of time.
Add the dates to your sheet so it's easy to use this in H8:
=SUMPRODUCT(--($A$5:$A$16>=$I$4), --($A$5:$A$16<=$I$5), --($C$5:$C$16=$G8), --($F$5:$F$16=H$7), $D$5:$D$16)
_________________
Microsoft MVP 2010 - Excel
Visit: Jerry Beaucaire's Excel Files & Macros
If you've been given good help, use theicon below to give reputation feedback, it is appreciated.
Always put your code between code tags. [CODE] your code here [/CODE]
“None of us is as good as all of us” - Ray Kroc
“Actually, I *am* a rocket scientist.” - JB (little ones count!)
This really begs for a pivot table, though. Add a column that calculates week number.
Microsoft MVP - Excel
Entia non sunt multiplicanda sine necessitate
Given you're using XL2007 you should use SUMIFS in preference to SUMPRODUCT - see XL Help for more info.
My Recommended Reading:
Volatility
Sumproduct & Arrays
Pivot Intro
Email from XL - VBA & Outlook VBA
Function Dictionary & Function Translations
Dynamic Named Ranges
OK, New data is put in and the formula is missing one of the cells. Whats going on? The highlighted cell (D25) isn't added into the sum of the formulas like the other ones are. What gives?
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks