try
=sumproduct(A1:A6,B1:B6)/Sumproduct(--(A1:A6<""),B1:B6)
the --( in the sumproduct makes the logical True-False response inside ther
parenthesis become a 1-0 value
"jeffsfas" wrote:
I have 2 columns, first range is a set of numbers (which includes
zeroes) and the other is balances. I need to weight by the balance
column, excluding the zeroes in the first range of numbers, to get the
Non-zero weighted average of the first range of numbers.
Ex/ Columns
Row A B
1 0 200
2 4 1000
3 16 1400
4 7 1050
5 0 300
6 29 5000
A zero-weighted average would just be the following formula
sumproduct(A1:A6,B1:B6)/sum(B1:B6)
-- but I need to do this as nonzero.
Hope this clarifies, the help is greatly appreciated.
--
jeffsfas
------------------------------------------------------------------------
jeffsfas's Profile: http://www.excelforum.com/member.php...o&userid=24462
View this thread: http://www.excelforum.com/showthread...hreadid=380573