View Single Post
  #15   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Rick Rothstein \(MVP - VB\) Rick Rothstein \(MVP - VB\) is offline
external usenet poster
 
Posts: 2,202
Default count and return pair numbers

Good point! Thanks for noting that.

Rick


"Sandy Mann" wrote in message
...
Rick,

Odd: =SUMPRODUCT(--(MOD(A1:F1,2)=1))


You don't need the =1, (--(MOD(A1:F1,2) returns 0 or 1 anyway

--
Regards,

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk


"Rick Rothstein (MVP - VB)" wrote in
message ...
Try these formulas...

Odd: =SUMPRODUCT(--(MOD(A1:F1,2)=1))

Even: =SUMPRODUCT(--(MOD(A1:F1,2)=0))

Rick


"Sly" wrote in message
...
sorry

odd numbers = 2

Even numbers = 4



"bj" wrote:

What is your definition for pair and impair numbers?

"Sly" wrote:

What function can I use to return the number of pair or impair
numbers in a
row

A B C D E F

Row 1 2 6 9 11 16 20 Pair number = 4
Impair number = 2

Thanks

Sly