# Counting based on two distinct values

#### timtimba

##### New Member
Hi,

I am trying to count multiple occurences.

 Instrument Name Times Traded AEON CO LTD 6 ASICS CORP 3 ELECTRIC POWER DEVELOPMENT C 10

<TBODY>
</TBODY>

In column C (Times Traded) I have used a simple countif formula: =COUNTIF(\$B\$2:\$B\$8068, C2)

Now I have to check for how many times this instrument was bought or sold. This is in column A .... How will I count the Buy values ... cause this formula I devised doesnt work =COUNTIF(\$B\$2:\$B\$8068, and(C2, A2:A8068="Buy")

Any help will be appreciated

### Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
Try

Try

Perfect! Thanks VoG!

can I be of bit more pain and ask you to explain this formula? .... so I know for future reference

Replies
1
Views
616
Replies
5
Views
198
Replies
10
Views
1K
Replies
1
Views
417
Replies
13
Views
937

1,203,468
Messages
6,055,599
Members
444,800
Latest member
KarenTheManager

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