View Single Post
  #23   Report Post  
Posted to microsoft.public.excel.worksheet.functions
John C[_2_] John C[_2_] is offline
external usenet poster
 
Posts: 1,358
Default Countif function for Even and Odd numbers

Your right Biff, and I apologize to you. My ire gets up when I see something
like his post. The point I took offense to was this:
=SUMPRODUCT(--(MOD(A1:A10,2)0))
....
This isn't.

Your formula worked perfectly fine according to the OP specs, and with the
sample data showing only whole numbers (no blanks, decimals, or text), your
formula is OK.
I think I would have remained completely silent if instead he had said
something like:
This could be improved by. But to say flat out that your formula was not
going to do it, well, just got to me, far more than it should have.
I respect both your knowledge, and Harlan's knowledge, and as I stated
several times, you 2 have been on here for a long time, and have helped
countless people along the line. For that, I commend you both. There are
times, in my opinion, though that a responder oversteps the bounds of
courtesy, and telling people they are stupid, (or in this case, telling you
that you are wrong, when in fact you aren't), and I get tired of it.

--
** John C **
Please remember, if your question is answered, to check the YES box below.
It helps everyone.


"T. Valko" wrote:

Biff (T. Valko) can defend himself. Besides, I didn't think
I was being condescending to him. I may have been
pedantic and overengineering, but not condescending.


What do I need to defend myself from?

I don't think Harlan was being condescending towards me in his reply. He
simply noted some possible valid issues and I do the same at times.

However, I stand by my suggested formulas based on the information provided
by the OP. It's also true, as Harlan noted, that posters often oversimplify
their requests and this can lead to numerous follow-ups but I don't mind
follow-ups.

I'm all for *efficient robustness* but at some point unnecessary robustness
crosses the line into overkill. If we wanted to take this example to the
extreme none of us accounted for the possibility of there being text entries
in the range. Reading the OP one would not be led to believe that there were
text entries so accounting for that when not needed woud be overkill.

--
Biff
Microsoft Excel MVP


"Harlan Grove" wrote in message
...
John C <johnc@stateofdenial wrote...
I have read many of your posts, and you are constantly condescending. . .
.


Biff (T. Valko) can defend himself. Besides, I didn't think I was
being condescending to him. I may have been pedantic and
overengineering, but not condescending. I wasn't responding to the OP.

As for you, you want to correct me. From your perspective, I'm
incorrigible. Are you too stupid to realize this?

. . . but get down off your high horse and treat other with respect. . .
.


I do treat people with respect by default. Also definitely when they
deserve it. However, people like you who regret having grown too old
to be hall monitors and now look for other ways to make other people
do what you want them to do get what you get, at least not in the
threads where you're acting foolish.

Finally, without the condescension, to repeat:

Robustness is good. The formula

=SUMPRODUCT(--(MOD(A1:A10,2)0))

is OBJECTIVELY LESS ROBUST than

=SUMPRODUCT(--(MOD(A1:A10,2)=1))


Robustness isn't worthwhile?

The last formula will ALWAYS return the count of odd integers in
A1:A10 even when that range contains nonintegers and nonnumbers. Only
when there are error values in A1:A10 (or values greater than 2^28-1)
would it return something else (error values). Wouldn't that make it
more generally applicable and less subject to bugs in subsequent use?