View Single Post
  #13   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

Try these formulas...

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

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


Mike raises a good point about blanks. Here are revisions to the above which
will account for the blanks...

Odd: =SUMPRODUCT((A1:F1<"")*(MOD(A1:F1,2)=1))

Even: =SUMPRODUCT((A1:F1<"")*(MOD(A1:F1,2)=0))

Rick