Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
MyKool
 
Posts: n/a
Default Countif( 2 criteria = true ?)

Hi can you please help me...

I am trying count the number of items based on 2 criteria can you please
help me..?
Basically I have a sheet and in col A I have Code and col B I have name. eg:
Col A - Col B
1001 - Mike
1001 - Dave
1001 - Keith
1002 - Terry
1001 - Mike
What I am trynig to do is count how many say ("Mike" col B) with code of say
("1001" col A). so the answer according to the above will be "2".
I know I can use the dsum function to do this but the problem is I am trying
to get a formula in 1 cell to do the job as opposed to 2 rows + 3 columns..
hense is there a kind of countif(and) function or something I can use ???
Thanks.
  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default Countif( 2 criteria = true ?)

=SUMPRODUCT(--(B2:B200="Mike"),--(A2:A200=1001))

--

HTH

RP
(remove nothere from the email address if mailing direct)


"MyKool" wrote in message
...
Hi can you please help me...

I am trying count the number of items based on 2 criteria can you please
help me..?
Basically I have a sheet and in col A I have Code and col B I have name.

eg:
Col A - Col B
1001 - Mike
1001 - Dave
1001 - Keith
1002 - Terry
1001 - Mike
What I am trynig to do is count how many say ("Mike" col B) with code of

say
("1001" col A). so the answer according to the above will be "2".
I know I can use the dsum function to do this but the problem is I am

trying
to get a formula in 1 cell to do the job as opposed to 2 rows + 3

columns..
hense is there a kind of countif(and) function or something I can use ???
Thanks.



  #3   Report Post  
MyKool
 
Posts: n/a
Default Countif( 2 criteria = true ?)

Thanks thats great !!!

Please for my own knowledge, can you please tell me what is the double "-"
is for ??? as in :
= sumproduct(-- <-what is this for or what does it do ????

Many thanks

"Bob Phillips" wrote:

=SUMPRODUCT(--(B2:B200="Mike"),--(A2:A200=1001))

--

HTH

RP
(remove nothere from the email address if mailing direct)


"MyKool" wrote in message
...
Hi can you please help me...

I am trying count the number of items based on 2 criteria can you please
help me..?
Basically I have a sheet and in col A I have Code and col B I have name.

eg:
Col A - Col B
1001 - Mike
1001 - Dave
1001 - Keith
1002 - Terry
1001 - Mike
What I am trynig to do is count how many say ("Mike" col B) with code of

say
("1001" col A). so the answer according to the above will be "2".
I know I can use the dsum function to do this but the problem is I am

trying
to get a formula in 1 cell to do the job as opposed to 2 rows + 3

columns..
hense is there a kind of countif(and) function or something I can use ???
Thanks.




  #4   Report Post  
Bob Phillips
 
Posts: n/a
Default Countif( 2 criteria = true ?)

See http://www.xldynamic.com/source/xld.SUMPRODUCT.html

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"MyKool" wrote in message
...
Thanks thats great !!!

Please for my own knowledge, can you please tell me what is the double "-"
is for ??? as in :
= sumproduct(-- <-what is this for or what does it do ????

Many thanks

"Bob Phillips" wrote:

=SUMPRODUCT(--(B2:B200="Mike"),--(A2:A200=1001))

--

HTH

RP
(remove nothere from the email address if mailing direct)


"MyKool" wrote in message
...
Hi can you please help me...

I am trying count the number of items based on 2 criteria can you

please
help me..?
Basically I have a sheet and in col A I have Code and col B I have

name.
eg:
Col A - Col B
1001 - Mike
1001 - Dave
1001 - Keith
1002 - Terry
1001 - Mike
What I am trynig to do is count how many say ("Mike" col B) with code

of
say
("1001" col A). so the answer according to the above will be "2".
I know I can use the dsum function to do this but the problem is I am

trying
to get a formula in 1 cell to do the job as opposed to 2 rows + 3

columns..
hense is there a kind of countif(and) function or something I can use

???
Thanks.






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
countif criteria only one word of few doesn't work dcd123 Excel Worksheet Functions 3 August 22nd 05 01:46 PM
Countif w/ Multiple Criteria Patrick_KC Excel Worksheet Functions 2 August 9th 05 09:25 PM
countif variable criteria neda5 Excel Discussion (Misc queries) 3 May 3rd 05 10:55 AM
Countif using format criteria....not number criteria? Troy Excel Worksheet Functions 1 April 20th 05 04:50 AM
counting cells (COUNTIF) based on two or more criteria Tricia S. Excel Worksheet Functions 10 March 17th 05 02:17 PM


All times are GMT +1. The time now is 12:06 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"