Doing a count of a value in another collumn

ewb1981

New Member
Joined
Jun 11, 2002
Messages
15
In collumn P I have several different values. In the next few collumns i either have yes or no to the the various values. Ive already created formulas to count the yes or no values. However what I'm really looking for is a way to count the occurances of no blank spaces for the critera in P. I want to look at collumn P but count the occurances of istext for Q. Not sure if im really being clear but my excel workbook looks a bit like the following

P Q R
Customer YES YES
Prospect NO
Partner YES
Customer

I would like to be able to find a formula that would tell me that there is 1 customer 1 prospect and 1 partner in Q for this example of the workbook.
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
On 2002-08-29 06:24, ewb1981 wrote:
In collumn P I have several different values. In the next few collumns i either have yes or no to the the various values. Ive already created formulas to count the yes or no values. However what I'm really looking for is a way to count the occurances of no blank spaces for the critera in P. I want to look at collumn P but count the occurances of istext for Q. Not sure if im really being clear but my excel workbook looks a bit like the following

P Q R
Customer YES YES
Prospect NO
Partner YES
Customer

I would like to be able to find a formula that would tell me that there is 1 customer 1 prospect and 1 partner in Q for this example of the workbook.

Let P1:R5 house the sample you provided:

{"Field1","Field2","Field3";
"Customer","YES","YES";
"Prospect","NO","";
"Partner","YES","";
"Customer","",""}

Create a unique list of items from P1:P5 in M from M1 on. You should get:

{"Field1";"Customer";"Prospect";"Partner"}

in M1:M4.

In N2 enter & Copy down:

=SUMPRODUCT(($P$2:$P$5=M2)*(LEN($Q$2:$Q$5)>0))

In O2 enter & copy down:

=SUMPRODUCT(($P$2:$P$5=M2)*(LEN($R$2:$R$5)>0))

See the figure...
aaMultCondCounting ewb1981.xls
MNOPQR
1Field1Field1Field2Field3
2Customer11CustomerYESYES
3Prospect10ProspectNO
4Partner10PartnerYES
5Customer
Sheet1
 
Upvote 0

Forum statistics

Threads
1,214,872
Messages
6,122,025
Members
449,060
Latest member
LinusJE

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top