P
Peo Sjoblom
Or the VBA Mod which works better I believe
Is there a simple way to count "odd" numbers in a column/row? And is there
any limit on the size of the actual number?
Thanx in advance...
Is there a simple way to count "odd" numbers in a column/row? And is there
any limit on the size of the actual number?
Thanx in advance...
....Sandy Mann said:This counts empty cells as even
Actually, the mathematical version of summing odd numbers is reasonably
simply, either...
=SUMPRODUCT(--(A1:A20-2*INT(A1:A20/2)=1))
normal entered or
=SUM(--(A1:A20-2*INT(A1:A20/2)=1))
array entered. However, there is a limitation to this version... you can
only handle numbers to a maximum value of fourteen (not fifteen) 9s. The
even numbers versions would be...
=SUMPRODUCT((A1:A20-2*INT(A1:A20/2)=0)*(A1:A20<>""))
normally entered and
=SUM((A1:A20-2*INT(A1:A20/2)=0)*(A1:A20<>""))
array entered.
That's true; I was just trying to tie up loose ends in the MOD function
discussion. The generic mathematical equivalent for the MOD function is
this...
Remainder = Number - Modulus * Int(Number / Modulus)
where, for this discussion, the Modulus is 2... this is where my last
formulas came from.
Rick
OIC. Sometimes it's hard to keep track of who is talking about what
in these threads )
Yeah, this thread has gotten kind of long, so I know what you mean. Still,
things aren't too bad here as there is a tree structure to help out. In
addition to VB, I also fool around with a program called REALbasic
(cross-platform visual Basic type language) and, back when I first obtained
the program, their peer-support was through "mail lists" rather than
newsgroups. I signed up for several of these mail lists and my Inbox was
inundated with what seemed to me to be a completely unstructured
question/response pool. I couldn't figure out who asked what, what answers
applied to what questions, what questions had been resolved and so on. I
simply could not follow what was going on and so I dropped out of all the
mail lists I had subscribed to after a couple of weeks (the mail lists
eventually gave way to forum type participation). So, from my point of view,
it just cannot get too convoluted here for me to track... it's like heaven
here compared to those mail lists.<g>
Rick
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.