View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Formula Question

The take-away from the earlier response is to effect the dynamic ranges
pegged on a certain key col (eg: Col AB - the col to be summed) to ensure
range size consistency. The other presumption besides what was mentioned
earlier is that the key col should not have any intervening blanks.

So, for your expression:
=SUMPRODUCT(--(InvoicedSales!$A$4:$A$6528=DATE(YEAR($A7),MONTH($ A7),DAY($A7))),--(InvoicedSales!$C$4:$C$6528=1),InvoicedSales!$O$4: $O$6528)


Indicatively, along the same lines, it could be framed up like this
Exp1: OFFSET(InvoicedSales!$A$4,,,Count(InvoicedSales!O: O))
Exp2: OFFSET(InvoicedSales!$C$4,,,Count(InvoicedSales!O: O))
Exp3: OFFSET(InvoicedSales!$O$4,,,Count(InvoicedSales!O: O))
where all the 3 dynamic ranges are pegged to Col O

Then you could use: =Sumproduct((Exp1=Cond1)*(Exp1=Cond2)*Exp3)

Frame it up likewise for your other expression
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:16,200 Files:354 Subscribers:53
xdemechanik
---
"Secret Squirrel" wrote in
message ...
Follow up questions:

What if I had another variable in my formula? How would I use these
variables with your formula below?

Here's my formula with the variable using column C.

=SUMPRODUCT(--(InvoicedSales!$A$4:$A$6528=DATE(YEAR($A7),MONTH($ A7),DAY($A7))),--(InvoicedSales!$C$4:$C$6528=1),InvoicedSales!$O$4: $O$6528)

Here's my formula using a greater than/less than date range:

=SUMPRODUCT(--('PC-01'!$O$2:$O$20000<DATE(YEAR(C1),MONTH(C1),DAY(C1)) ),--('PC-01'!$O$2:$O$20000=DATE(YEAR($A$10),MONTH($A$10),1 )),'PC-01'!$AB$2:$AB$20000)