IF THERE ARE 9 P AND 5 A IN A ROW THEN HOW TO CALCULATE

S

SRINIVAS

I WANT TO CALCULATE NUMBER OF "P" AND NUMBER OF "A" IN A ROW SO WHAT SHOULD
BE THE FORMULA FOR THE SAME?
 
P

Peo Sjoblom

=SUM(COUNTIF(A2:H2,{"P";"A"}))


please refrain from using all caps, it is considered rude

--


Regards,


Peo Sjoblom
 
S

Soundar

Hi,

You can use COUNTIF function.

=COUNTIF(RANGE,"P")
=COUNTIF(RANGE,"A")

Regards,
Soundar.
 
R

RagDyeR

You didn't mention if there was *nothing else* in the cells except for the
p's & q's,
or if the p's and q's could occupy the same cell.

This counts *all* the p's and q's in Row1, no matter where they are:

=SUMPRODUCT(LEN(1:1)-LEN(SUBSTITUTE(UPPER(1:1),UPPER({"p";"q"}),"")))


--

HTH,

RD
=====================================================
Please keep all correspondence within the Group, so all may benefit!
=====================================================



I WANT TO CALCULATE NUMBER OF "P" AND NUMBER OF "A" IN A ROW SO WHAT SHOULD
BE THE FORMULA FOR THE SAME?
 
S

SRINIVAS

Thanks Soundar

The Function which you mentioned here is worked for me and resolved my
problem.

Thanks once again

Regards

Srinivas
 
Top