count all the columns in a range with certain conditions

H

hopeace

I need to count all the columns in a range with these conditions: i
they contain entries; and are the entries only 'n' values.

'y'= goal met 'n'=goal not met

.........................................john......sues......mary.....jack
improved attendance..............y............n.....................n
increased time i
class............y............y.....................n
grade/cours
completion.......................n........................

I want the formula to come back as =1 because only jack has thes
goals, and he did not achieve these goals.

In order to chart this i would also need a formula that tells me ho
many students had goals in their column (not how many goals, or th
result, just if they had any goals).

Thanks!!!
keit
 
P

pinmaster

Hi
If it is possible, try inserting a blank row above your range, you can
hide that row later. Now lets say that your range starts in column A
row 5, in your blank row starting on the second column (in your example
above John) put this formula:
=IF(AND(COUNTIF(B5:B7,"n")>0,COUNTIF(B5:B7,"n")=COUNTA(B5:B7)),1,0)
and copy across, to get the number of columns simply sum the row you
inserted.

P.S. you will need to ajust the formula for your range.....B5:B7

HTH
JG
 
H

hopeace

Brillant!!!

thank you so much once again JG. You are very giving to this
community.

keith
 
P

pinmaster

Hi Keith
My knowlege of Excel is limited, but I'm always glad to help whenever
I can. And thanks again for the feedback, much apreciated.

Regards
JG
 

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

Top