ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   New Users to Excel (https://www.excelbanter.com/new-users-excel/)
-   -   counting text in a column (https://www.excelbanter.com/new-users-excel/40459-counting-text-column.html)

ferde

counting text in a column
 
MD RN RT
y na na
n y y
y n na
na y n

I would like to total the Y and N from each column but ignore the NA

Thank you for your help
ferde


JE McGimpsey

One way:

=SUM(COUNTIF(A1:A10,{"y","n"}))

In article ,
"ferde" wrote:

MD RN RT
y na na
n y y
y n na
na y n

I would like to total the Y and N from each column but ignore the NA

Thank you for your help
ferde


Colin Vicary


Hi

Assuming you column heading is in A1, paste this in an empty cell

=COUNTIF(A2:A5,"Y")+COUNTIF(A2:A5,"N")

Colin


--
Colin Vicary
------------------------------------------------------------------------
Colin Vicary's Profile: http://www.excelforum.com/member.php...o&userid=10472
View this thread: http://www.excelforum.com/showthread...hreadid=395841


Paul Sheppard


ferde Wrote:
MD RN RT
y na na
n y y
y n na
na y n

I would like to total the Y and N from each column but ignore the NA

Thank you for your help
ferde


Hi Ferde

Assuming Header rows are in row 1, and data in a2:c5

To Count just the "Y"'s use =COUNTIF(A2:A5,"Y") in A6 and drag across
to C6

To Count just the "N"'s use =COUNTIF(A2:A5,"N") in A6 and drag across
to C6

And to count both use =COUNTIF(A2:A5,"Y")+COUNTIF(A2:A5,"N") in A6 and
drag across to C6


Change ranges to suit your data


Hope this helps

Paul


--
Paul Sheppard
------------------------------------------------------------------------
Paul Sheppard's Profile: http://www.excelforum.com/member.php...o&userid=24783
View this thread: http://www.excelforum.com/showthread...hreadid=395841


ferde

Thank you so much , it works great

"Colin Vicary" wrote:


Hi

Assuming you column heading is in A1, paste this in an empty cell

=COUNTIF(A2:A5,"Y")+COUNTIF(A2:A5,"N")

Colin


--
Colin Vicary
------------------------------------------------------------------------
Colin Vicary's Profile: http://www.excelforum.com/member.php...o&userid=10472
View this thread: http://www.excelforum.com/showthread...hreadid=395841




All times are GMT +1. The time now is 01:34 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com