can you use countif function for noncontiguous cells

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to use the countif function to add the appearance of value in
cells that are not adjacent to each other. Specifically I have two cells that
pertain to the same question. For each question I want to compile the
occurence of certain value therefore I want to use the countif function on
every second column.
 
Not countif, but you can do it

=SUMPRODUCT(--(A1:M1="value),--(MOD(COLUMN(A1:M1),2)=0)

which will count B, D, etc. if they equal the required value

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
One way

=SUMPRODUCT((MOD(COLUMN(A2:O2),2)=1)*(A2:O2="A"))

will count A in A2:O2 in A, C, E etc

--
Regards,

Peo Sjoblom

(No private emails please)
 

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

Back
Top