• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Odd and even numbers in the range

bines53

Active Member
Hello Friend !

I want to get the result as in cells H15, I15 without the use of help columns.

Thank you !
 

Attachments

  • test 88.xlsx
    8.7 KB · Views: 18
Hi David ,

Try these array formulae , to be entered using CTRL SHIFT ENTER :

=SUM(--(MMULT(--(MOD($A$2:$F$12,2)=0),TRANSPOSE(COLUMN($A$2:$F$12)^0))=3))

=SUM(--(MMULT(--(MOD($A$2:$F$12,2)=1),TRANSPOSE(COLUMN($A$2:$F$12)^0))=4))

Narayan
 
Ah, the mysterious MMULT:eek:...I had a feeling we would need to use it's dark powers in order to do this. :p
 
You can also use this formula Without {}
=SUM(--(MMULT(--(MOD($A$2:$F$12,2)=0),{1;1;1;1;1;1})=3))
=SUM(--(MMULT(--(MOD($A$2:$F$12,2)=1),{1;1;1;1;1;1})=4))
 
Hi David,

Just another alternative using MMULT:
In H15:
=SUMPRODUCT(--(MMULT(--ISEVEN(--$A$2:$F$12),{1;1;1;1;1;1})=3))

In I15:
=SUMPRODUCT(--(MMULT(--ISODD(--$A$2:$F$12),{1;1;1;1;1;1})=4))

Regards,
 
Back
Top