Re: array formula(s)- not working, need some help please (problem with an 'AND')
- From: "Bob Phillips" <bob.NGs@xxxxxxxxxxxxx>
- Date: Wed, 5 Jul 2006 15:43:06 +0100
simply put, the test
(D$3:D$3000=D3)
returns an array of TRUE/FALSE values. Performing an arithmetic operation on
it transforms this to an array of 1/0 values, which SP can use to multiply
by the actual values to get only the values where a condition is met. So a
single unary, -, transforms the TRUE/FALSE to 1/0, but a negative 1. So a
second is required to get it back to positive 1.
Thee is a lot more detail at
http://www.xldynamic.com/source/xld.SUMPRODUCT.html .
--
HTH
Bob Phillips
(replace somewhere in email address with gmail if mailing direct)
"KR" <nospam@xxxxxxxxxx> wrote in message
news:OtH8CCEoGHA.2068@xxxxxxxxxxxxxxxxxxxxxxx
Bob and Barb-me
Thank you for pointing me to the sumproduct formula. I think it will give
what I need, but I saw that both of you include a double negative (--) inthe
front of your secondary conditions. I didn't see anything about that in
helpfile- I'm assuming that prevents some other potential problem with theto
formula....can you enlight me as to what that prevents or achieves? Just
make sure I don't accidently mess it up ;-)=IF(AND(D3<>D2,LEN(D3)>0),SUMPRODUCT(--(D$3:D$3000=D3),--(J$3:J$3000=""),AA$
Thanks!!
Keith
"Bob Phillips" <bob.NGs@xxxxxxxxxxxxx> wrote in message
news:%23ypsf6DoGHA.2100@xxxxxxxxxxxxxxxxxxxxxxx
Something along the lines of
occurred3:AA$3000)),"")
just add more conditions like
--(range, test_against)
This is not an array formula
--
HTH
Bob Phillips
(replace somewhere in email address with gmail if mailing direct)
"KR" <nospam@xxxxxxxxxx> wrote in message
news:el89JnDoGHA.4728@xxxxxxxxxxxxxxxxxxxxxxx
Column AA= numeric count of program participation
Column D= list of manager names (name repeats on each line)
Column G= list of employees by manager (plus one blank cell for
manager/self)
Column J = exclusion criteria
basically I'm trying to get a sum of how much participation has
andin
each manager's area, without including that manager's participation,
valuesonly for people without exclusion criteria- so I need to sum the
inJ
AA once per manager, excluding rows where Column G is blank or Column
isof
everythingnot blank.
I got as far as this first array formula, which works to sum up
for that manager, but includes the manager's row, and sums regardless
=IF(AND(D3<>D2,LEN(D3)>0),SUM(IF(D$3:D$3000=D3,AA$3:AA$3000,0)),"") }onceexclusion criteria:
'using IF(AND(D3<>D2,LEN(D3)>0),<stuff>,"") to only show the total
per manager name
criteriaexclude
However, I still need to only count rows with employee names, and
those that should be excluded, so I tried to add the exclusion
{=IF(AND(D3<>D2,LEN(D3)>0),SUM(IF(AND(D$3:D$3000=D3,J$3:J$3000=""),AA$3:AA$3first, and can't get it working:
I000,0)),"") }
something about adding the AND formula makes my result zero, even when
example,know there should be some value returned.
--> AND(D$3:D$3000=D3,J$3:J$3000="")
I would think that this would check each row one at a time, for
representinclude AA5 in the sum only if D5=D3 /and/ J5 <>""
but now I'm starting to think that isn't how it works....
I'd appreciate any clarification on how to build this type of multiple
criteria into an array formula.
Thanks!
Keith
--
The enclosed questions or comments are entirely mine and don't
themy
thoughts, views, or policy of my employer. Any errors or omissions are
own.
.
- References:
- Prev by Date: Re: if function
- Next by Date: Re: calculate date between
- Previous by thread: Re: array formula(s)- not working, need some help please (problem with an 'AND')
- Next by thread: Re: array formula(s)- not working, need some help please (problem
- Index(es):
Relevant Pages
|