Formula Help

C

Casey

I am trying to do the following and can't figure out the formula.

I have cells across a column that have one of the following numbers:
0,1,2,3,4. I want to get the number of cells that have a 1 or a 2.

For example, lets say A3 is a 1, C3 is a 3, E3 is a 4 and G3 is 2. I want
the forumala to give me 2 (1 in A3 and 2 in G3).

I am sure it is fairly simple, but I can't figure it out.
Thanks
 
×

מיכ×ל (מיקי) ×בידן

One way would be: =SUMPRODUCT((A3:G3<>0)*(A3:G3<=2))
Micky
 
C

Casey

Thanks for the suggestion. One of the problems is that I have content
between the cells. So between A3 and C3, there is a cell with a number that
I don't want as part of the final number. Is it possible to edit the formula
to just desired the columns?
 
×

מיכ×ל (מיקי) ×בידן

Well..., maybe:
=SUMPRODUCT((MOD(COLUMN(A3:G3),2))*(A3:G3<=2))
Micky
 

Ask a Question

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.

Ask a Question

Top