HELP COUNTING

P

Pat Brewington

XP XP P XP P XP P P P XP XA XP XP
XA XA P P P P P P XA XA XA XA XA
XP XP P XP P XP P P P XP XP XP XP
P XA P P P P P P XA UXA P P XA
P P P P UXA UXA P P P P XA P P
P P P UXA P UXA P P P XA UXA XA XA
P P P P P P XA UXA XA XA XA XA XA
P P P P XA P XA XA XA UXA XA XA XA
P P P XA P P P P P P P P P
P XA XA XA XA XA XA XA XA XA XA XA XA
P UXA P P UXA P P P P P P
P P P P XA P P P



I NEED A FORMULA TO COUNT THE P'S,AND XP'S TOGETHER
AND THE XA'S AND UXA'S TOGETHER. ANY HELP???? PLEASE????
 
B

Bob Phillips

Count them together, or count the P and XPs adjacent?

Former

=SUMPRODUCT(COUNTIF(A1:M12,{"P","XP"}))

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
P

PCLIVE

If each letter or letter combination is in a seperate cell, then you can use
a countif statement. However, if all of the data you listed is in the same
sell then:


This should return the number of "XP" plus the number "P".
=(LEN(A1)-LEN(SUBSTITUTE(A1,"XP","")))/2+LEN(SUBSTITUTE(A1,"XP",""))-LEN(SUBSTITUTE(SUBSTITUTE(A1,"XP",""),"P",""))

This should return the number of "UXA" plus the number "XA".
=(LEN(A1)-LEN(SUBSTITUTE(A1,"UXA","")))/3+(LEN(SUBSTITUTE(A1,"UXA",""))-LEN(SUBSTITUTE(SUBSTITUTE(A1,"UXA",""),"XA","")))/2

HTH,
Paul
 
T

tinyguppie

Hopefully you dont need this because its for a project at school or
something similar :)
 
B

Bob Phillips

What was your answer?

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
Top