# Doing a count of a value in another collumn

#### ewb1981

##### New Member
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

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
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

Replies
4
Views
213
Replies
2
Views
98
Replies
1
Views
199
Replies
1
Views
132
Replies
9
Views
170

1,221,495
Messages
6,160,143
Members
451,624
Latest member
TheWes

### 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.

### Which adblocker are you using?

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

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