Friday, 23 March 2018

microsoft excel - Adding "odd" numbers


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

Where does Skype save my contact's avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...