"Rod" <R...@discussions.microsoft.com> wrote in message
news:D68E252D-EF7E-439E...@microsoft.com...
change range to fit your needs
If you don't mind could you please explain briefly the logic behind it?
Thanks in advance.
ISNUMBER(MATCH(A1:A10,C1:C2,0))
then converts it to True/False:
{FALSE;TRUE;FALSE;TRUE;FALSE;FALSE;FALSE;FALSE;FALSE;FALSE}
where #N/A = False, any number (ie the 1, 2) = True
The double minus: --
--(ISNUMBER(MATCH(...)))
then converts the True/Falses to 1/0:
{0;1;0;1;0;0;0;0;0;0}
The sumproduct then cross-multiplies the above final array of 1/0s with the
corresponding numbers in B1:B10 and sums the lot, giving the desired result
--
Max
Singapore
"Rod" <R...@discussions.microsoft.com> wrote in message
news:FD29FCF2-CF0F-4750...@microsoft.com...
"Max" wrote:
> .
>
for example if A1 thru F1 contains:
1 2 3 qwerty 5 67
then SUM(A1:F1) returns 78
qwerty is treated like a zero.
--
Gary''s Student - gsnu200909