Need clarification on why my formula works
You're welcome. Thanks for the feedback!
--
Biff
Microsoft Excel MVP
"LauriS" wrote in message
...
Thanks, Biff. What I was missing was the fact that the arrays return a
LIST
of answers - not just one.
Now it makes perfect sense!
Lauri S.
"T. Valko" wrote:
These 2 arrays are multiplied together:
(A2=$R$2:$R$9999)
(B2=$S$2:$S$9999)
The result of this multiplication is an array of 1s and 0s. This is how
that
would look:
(A2=R2) = FALSE * (B2=S2) = FALSE
FALSE * FALSE = 0
(A2=R3) = TRUE * (B2=S3) = TRUE
TRUE * TRUE = 1
It does this for each element.
Now you have an array of 1s and 0s:
0
1
0
0
0
MATCH is looking for the lookup_value of 1:
MATCH(1,{0;1;0;0;0},0)
1 is a match and it's in the 2nd position of the lookup_array. The 2 is
then
passed to the INDEX function:
=INDEX(T2:T9999,2)
The result of the formula is the value in cell T3.
--
Biff
Microsoft Excel MVP
"LauriS" wrote in message
...
Yep, it works. But I'm not sure I understand exactly HOW.
Here's the formula:
=INDEX($T$2:$T$9999,MATCH(1,(A2=$R$2:$R$9999)*(B2= $S$2:$S$9999),0)))
I understand the Index part but what's throwing me is the Match. I've
read
all I can find on Match in the help screens and I can't find anything
that
deals with the multiplication that is in my Match.
I know it's returning the row number for the Index but I don't
understand
HOW it's doing that.
Thanks for any help!!
Lauri S.
|