Count formula

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

Guest

Hi,

I need someone to pull a count formula together for me.

I have the following string of dats

Col
A B C

R 1
R
R 50 5
N 6 12
N 2
N 9 4


I need to count how many values are in column B for R and N. So Column B
will return 2 for R and 3 for N and in Column C 1 for R and 2 for N's.

Can you please provide an answer.

Thanks
 
Assuming column a contains only R's and N's (and nothing else),
you can use the following formula in column D2, and copy down:
=B2*(IF(A2="R";2;3))+C2*(IF(A2="R";1;2))

HTH
 
=SUMPRODUCT(--(A1:A100="R"),--(B1:B100<>""))

=SUMPRODUCT(--(A1:A100="R"),--(C1:C100<>""))

etc.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)
 
Back
Top