CountIf using every other column

D

duketter

Excel 2003 - I am trying to count the number of times the number "2" appears
in column A1, C1, E1, G1, I1, etc. I am trying to use the countif function,
but it won't work. I can't just select every other column like I need to, it
wants me to select the entire range if that makes sense.

Is there anyway I can do this and only look at every other column or every
3rd column?

Thanks!
 
T

T. Valko

count the number of times the number "2" appears in
column A1, C1, E1, G1, I1, etc.

Try this:

=SUMPRODUCT(--(MOD(COLUMN(A1:I1)-COLUMN(A1),2)=0),--(A1:I1=2))
 

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