I'm trying to add only "odd" numbers from a range(named "data") which contains numbers, blank cells and text. No matter what I try I always seem to end up with a #value error. My latest attempt is as follows: =SUMPRODUCT(N(MOD(Data,2)=1),Data) Any suggestions?
Answer
Use Array Formula
=SUM(IF(ISNUMBER(data), IF(MOD(data, 2) = 1, data, 0), 0))
Press Ctrl+Shift+Enter after entering the formula
(Tested in Excel 2003)
No comments:
Post a Comment