Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

EXCEL : Counting number of Cells that Equal 2 Values...please help 1

Status
Not open for further replies.

SteveAudus

Technical User
Oct 4, 2001
409
GB
I am trying without success to count the number cells in column S contain the value 2, only if the same cell on the that row in column W contains a "F".
But my formula just keeps throwing back #VALUE!

=SUM((IF(ISNA($S$2:$S$202),0,IF($S$2:$S$202=2,1,0)))*($W$2:$W$202="F"))

You may of guessed I am trying to count the number of girls with a grade mark 2.

Any suggestions,

Steve Audus
Chaucer School
 
Use the pivot table tool....it will do what you need.


 
Click Data, Pivot Table Wizard and follow the wizard through

Post again if you need more help

Neil Berryman
IT Trainer
neil_berryman@btopenworld.com
 
Another idea

Click in you data and Click Data, Sort.

Sort by Sex and the by grade and click OK

Next Click Data, Subtotals and select the Grade and select the count function in the box below.

That should give you F and a count of each grade and the same for M


Neil Berryman
IT Trainer
neil_berryman@btopenworld.com
 
Hello Steve

you can use the sumproduct function

=SUMPRODUCT((S2:S202=2)*(W2:W202="F"))

HTH

Andreas
using xl2000 on win2k
 
Hi Steve - I believe I gave you that formula a little while back

Are you entering with CTRL+SHIFT+ENTER ???? - it's an array formula so will return the #VALUE! error if you only use ENTER to insert the formula Rgds
~Geoff~
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top