View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Gary Keramidas[_2_] Gary Keramidas[_2_] is offline
external usenet poster
 
Posts: 364
Default need some formula help please

the formula will not even enter, gives me an error even when trying to enter
as an array

--


Gary


"abcd" wrote in message
...
try SUMPROD

this multiply each argument (element by element) and finaly add all the
elementary results

for example SUMPROD({1;2;3};{1;2;3}) = 1*1 + 2*2 + 3*3


NOTICE: a logical result is not a number, so for example you must
add --ISNA(range)
( the double -- at the begining makes FALSE becomes the number 0 and TRUE
becomes the number 1; it's not the only way you may multiply the logical
by 1 for example TRUE*1=1 )

example:

=SUMPROD( --ISNA(A1:A6) ; --(MOD(A1:A6;2)=1) ; A1:A6)

notice here I make MOD = 1 so the rows 1,3, etc. (even) will be used