Welcome to Dream.In.Code
Getting Help is Easy!

Join 132,626 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,053 people online right now. Registration is fast and FREE... Join Now!




MSExcel

 
Reply to this topicStart new topic

MSExcel, COUNTIF

Limbo
post 18 Apr, 2006 - 11:19 AM
Post #1


D.I.C Head

**
Joined: 8 Mar, 2006
Posts: 133


My Contributions


Hey guys,

Just learnt of this neat Excel function =COUNTIF(range, criteria), which counts the number of your criteria (number or text) in your range.

But now I have a question. It's easier if I portray it as an example.

X A B
1 M P
2 M Q
3 F Q
4 F Q
5 F P

and so on...

With =COUNTIF(B1:B100, "Q"), I can count all those people in Q-party.
But now I want to count all the Females(F) in the Q-party.
Is there another COUNTIF-ish function that will help me do this easily?

Right now, I've resorted to using Column C with =IF(A1="F",1,0)*IF(B1="Q",1,0)
and then summing the total.

Thanks

This post has been edited by Limbo: 18 Apr, 2006 - 11:20 AM
User is offlineProfile CardPM

Go to the top of the page

the_hangman
post 18 Apr, 2006 - 12:04 PM
Post #2


D.I.C Addict

Group Icon
Joined: 18 Jan, 2006
Posts: 593



Thanked 1 times

Dream Kudos: 200
My Contributions


I have been trying to solve that very problem for a very very long time. I haven't found a way yet. I'd also like to find a way to add numbers in cells in the same way (ie: for all sales people named Jim in colA, total their commission from colB)
User is offlineProfile CardPM

Go to the top of the page

Limbo
post 18 Apr, 2006 - 12:31 PM
Post #3


D.I.C Head

**
Joined: 8 Mar, 2006
Posts: 133


My Contributions


I think I solved your problem. That is, if I understood correctly.
Let me portray it again smile.gif

Column A- Names of Reps, Column B- Commision
X A B
1 J 5
2 B 3
3 D 7
4 J 9
5 A 10

and so on...

and then I used
=SUMIF(A1:A5,"J",B1:B5)
and it gives me the result of 14, which is correct smile.gif

But concerning my problem... there needs to be some kind of Double If function...someday maybe :S
User is offlineProfile CardPM

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 11/23/08 03:34AM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month