Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
tw5633
 
Posts: n/a
Default How do I use COUNTIF if I am combining 2 columns?

I am trying to make a count of sales by salesperson. In column I, I have
"salesperson(DP,PR,BD)", and in column N, I have "sales status (S,NI,L,P,F)".
I want to find out how many "sales(S)", each person has. In a description
=COUNTIF(N:N,"=DP")IF(I:I,"=S") this is basically what I am trying to say. I
know that this is not the correct formula, I have been trying others, however
I haven't had success.
  #2   Report Post  
Duke Carey
 
Posts: n/a
Default

=SUMPRODUCT(--(N1:N100="DP"),--(I1:I100="S"))

"tw5633" wrote:

I am trying to make a count of sales by salesperson. In column I, I have
"salesperson(DP,PR,BD)", and in column N, I have "sales status (S,NI,L,P,F)".
I want to find out how many "sales(S)", each person has. In a description
=COUNTIF(N:N,"=DP")IF(I:I,"=S") this is basically what I am trying to say. I
know that this is not the correct formula, I have been trying others, however
I haven't had success.

  #3   Report Post  
tw5633
 
Posts: n/a
Default

Duke,
Thank you for your help. I did not know that in that formula you could
not use the whole column. You just saved my weekend.


"Duke Carey" wrote:

=SUMPRODUCT(--(N1:N100="DP"),--(I1:I100="S"))

"tw5633" wrote:

I am trying to make a count of sales by salesperson. In column I, I have
"salesperson(DP,PR,BD)", and in column N, I have "sales status (S,NI,L,P,F)".
I want to find out how many "sales(S)", each person has. In a description
=COUNTIF(N:N,"=DP")IF(I:I,"=S") this is basically what I am trying to say. I
know that this is not the correct formula, I have been trying others, however
I haven't had success.

  #4   Report Post  
Domenic
 
Posts: n/a
Default

Try...

=SUMPRODUCT(--(N1:N100="DP"),--(I1:I100="S"))

Note that SUMPRODUCT does not accept whole column references.

Hope this helps!

In article ,
tw5633 wrote:

I am trying to make a count of sales by salesperson. In column I, I have
"salesperson(DP,PR,BD)", and in column N, I have "sales status (S,NI,L,P,F)".
I want to find out how many "sales(S)", each person has. In a description
=COUNTIF(N:N,"=DP")IF(I:I,"=S") this is basically what I am trying to say. I
know that this is not the correct formula, I have been trying others, however
I haven't had success.

  #5   Report Post  
tw5633
 
Posts: n/a
Default

Domenic,
Thank you so much for your help. I did not know that SUMPRODUCT couldn't
use the whole column. You saved my weekend and my afternoon. Again Thanks

"Domenic" wrote:

Try...

=SUMPRODUCT(--(N1:N100="DP"),--(I1:I100="S"))

Note that SUMPRODUCT does not accept whole column references.

Hope this helps!

In article ,
tw5633 wrote:

I am trying to make a count of sales by salesperson. In column I, I have
"salesperson(DP,PR,BD)", and in column N, I have "sales status (S,NI,L,P,F)".
I want to find out how many "sales(S)", each person has. In a description
=COUNTIF(N:N,"=DP")IF(I:I,"=S") this is basically what I am trying to say. I
know that this is not the correct formula, I have been trying others, however
I haven't had success.




  #6   Report Post  
Ashish Mathur
 
Posts: n/a
Default

Hi,

You may use an array formula (Ctrl+Shift+Enter) to arrive at the same result

=count(if((range1="--")*(range2="--"),1,0))

Regards,

Ashish Mathur

"tw5633" wrote:

I am trying to make a count of sales by salesperson. In column I, I have
"salesperson(DP,PR,BD)", and in column N, I have "sales status (S,NI,L,P,F)".
I want to find out how many "sales(S)", each person has. In a description
=COUNTIF(N:N,"=DP")IF(I:I,"=S") this is basically what I am trying to say. I
know that this is not the correct formula, I have been trying others, however
I haven't had success.

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
analysing data from alternate columns using the countif function Juniper Excel Discussion (Misc queries) 3 April 28th 05 04:12 PM
Combining IF and COUNTIF based on two columns maxtrixx Excel Discussion (Misc queries) 5 March 31st 05 06:21 PM
want to count in two columns; countif (colA=x AND colB=y)? Heather Murch Excel Worksheet Functions 1 February 17th 05 03:47 PM
Pivot Table combining multiple columns Pete Petersen Excel Discussion (Misc queries) 1 January 13th 05 07:56 PM
combining 3 columns of same info for a pivot table Julie Excel Worksheet Functions 0 December 15th 04 03:12 PM


All times are GMT +1. The time now is 01:58 PM.

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

About Us

"It's about Microsoft Excel"