Quarterly figures with criteria

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have the following formula, giving me quarterly values. I need to add a
criteria "apples" to give me quarterly figures for that item. Any ideas?

{=SUM((A5005=ROUNDUP(MONTH($A$4:$A$5000)/3,0))*$D$4:$D$5000)}
This code is as an array. Is it best to use arrays or formulas?
 
maybe:

{=SUM((A5005=ROUNDUP(MONTH($A$4:$A$5000)/3,0))*$D$4:$D$5000)
*($x$4:$x$5000="apples")}

(still an array formula--where you use ctrl-shift-enter)
 
First, I think I screwed up the ()'s:

=SUM((A5005=ROUNDUP(MONTH($A$4:$A$5000)/3,0))*($D$4:$D$5000)
*($X$4:$X$5000="apples"))
(still array entered)

You could use =sumproduct(), but the only difference would be that you don't
need to use ctrl-shift-enter. But in my eyes, it's still an array formula.

=SUMproduct((A5005=ROUNDUP(MONTH($A$4:$A$5000)/3,0))*($D$4:$D$5000)
*($X$4:$X$5000="apples"))

or
=SUMproduct(--(A5005=ROUNDUP(MONTH($A$4:$A$5000)/3,0)),($D$4:$D$5000),
--($X$4:$X$5000="apples"))

Adjust the ranges to match--but you can't use whole columns (except in xl2007).

=sumproduct() likes to work with numbers. The -- stuff changes trues and falses
to 1's and 0's.

Bob Phillips explains =sumproduct() in much more detail here:
http://www.xldynamic.com/source/xld.SUMPRODUCT.html

And J.E. McGimpsey has some notes at:
http://mcgimpsey.com/excel/formulae/doubleneg.html

Thanks Dave.
If I did not want to use a array formular, how would I write the formular
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top