View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
Secret Squirrel Secret Squirrel is offline
external usenet poster
 
Posts: 172
Default Formula Question

Hi Greg,

The code looks great but for some reason I'm getting the old #VALUE! error
when I put it into my spreadsheet. I checked, rechecked, and checked it again
for errors but can't seem to find any. Can you see anything that might be
causing this error? I'm committing the formula with Ctrl + Shift + Enter.
Here is what I put into my file:

=SUM((MONTH(Detail!$J$2:$J$12000)=MONTH(B15))*(YEA R(Detail!$J$2:$J$12000)=YEAR(B15))*(Detail!$N$2:$N $12000=1)*(Detail!$Q$2:$Q$12000=0)*IF($B$3="All",( Detail!$B$2:$B$12000<"All"),(Detail!$B$2:$B$12000 =LeadTimes!$B$3))*IF($I$3="W/
BLANKET
ORDERS",(Detail!$L$2:$L$12000),(Detail!$L$2:$L$120 00="F"))*IF($M$3="All",(Detail!$M$2:$M$12000<"All "),(Detail!$M$2:$M$12000=LeadTimes!$M$3)))

"Greg Wilson" wrote:

Theoretical Array Formula :

= SUM(A*B*C*D*IF(Cond1, E, J) * IF(Cond2, F, I) * IF(Cond3, G, H))

Conditions List:

Cond1 : $B$3 = "All"
Cond2 : $I$3 = "W/ BLANKET ORDERS"
Cond3 : $M$3 = "All"

Arguments List:

A : (MONTH(Detail!$J$2:$J$49706)=MONTH(B15))
B : (YEAR(Detail!$J$2:$J$49706)=YEAR(B15))
C : (Detail!$N$2:$N$49706=1)
D : (Detail!$Q$2:$Q$49706=0)

E : (Detail!$B$2:$B$49706<€All€)
F : (Detail!$L$2:$L$49706)
G : (Detail!$M$2:$M$49706<€All€)
H : (Detail!$M$2:$M$49706=LeadTimes!$M$3)
I : (Detail!$L$2:$L$49706=€F€)
J : (Detail!$B$2:$B$49706=LeadTimes!$B$3)

Putting it Together:

=
SUM((MONTH(Detail!$J$2:$J$49706)=MONTH(B15))*(YEAR (Detail!$J$2:$J$49706)=YEAR(B15))*(Detail!$N$2:$N$ 49706=1)*(Detail!$Q$2:$Q$49706=0)*IF(Detail!$B$3
= "All", (Detail!$B$2:$B$49706<€All€),
(Detail!$B$2:$B$49706=LeadTimes!$B$3)) * IF($I$3 = "W/ BLANKET ORDERS",
(Detail!$L$2:$L$49706), (Detail!$L$2:$L$49706=€F€)) * IF($M$3 = "All",
(Detail!$M$2:$M$49706<€All€), (Detail!$M$2:$M$49706=LeadTimes!$M$3)))

Notes:

1. Commit the formula with Ctrl + Shift + Enter
2. I took the liberty to add "Detail!" to some of the ranges you gave me. I
might have it wrong. Check the Arguments list.
3. As mentioned earlier, I expect the performance to be a bit disapointing.
4. I'm working on a project at this time and can't give it my undivided
attention. Have my own post: http://tinyurl.com/yuc362

Hope it works !!!

Greg