# Counting Unique Values

#### apc1968

##### New Member
Hi - I have the following set of data:

 A B C D 1 Product Month Customer Value 2 3 Charts 1 AAA £20 4 Publications 1 BBB £25 5 Flags 1 AAA £33 6 Charts 1 AAA £10 7 Flags 2 BBB £15 8 Charts 2 AAA £16

<!--StartFragment--> <colgroup><col width="65" span="5" style="width:65pt"> </colgroup><tbody>
<!--EndFragment--></tbody>

I want to be able to look at how many unique customers bought charts in month 1? In the above table it would be 1 - thanks

### Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.

#### anglais428

##### Well-known Member
=SUM(IF("Charts"=\$A\$3:\$A\$8, 1/(COUNTIFS(\$A\$3:\$A\$8, "Charts", \$C\$3:\$C\$8, \$C\$3:\$C\$8)), 0))

Confirm with Control Shift Enter

#### apc1968

##### New Member
=SUM(IF("Charts"=\$A\$3:\$A\$8, 1/(COUNTIFS(\$A\$3:\$A\$8, "Charts", \$C\$3:\$C\$8, \$C\$3:\$C\$8)), 0))

Confirm with Control Shift Enter

Thanks - doesnt it need to reference column B so that it only picks up month 1 sales?

Thanks again

#### ankita.sethi

##### Board Regular
I would have added a column F and put in the formula the following formula in each row -
=IF(SUMPRODUCT((B3="Charts")*(C3=1))=1,D3,0)
This will 0's or the name of the Customer depending on the criteria met or not

to calculate final unique count use the following formula -
=SUM(IF(FREQUENCY(F3:F8,F3:F8)>0,1))
This will give you the answer '1' for the data posted

Replies
5
Views
643
Replies
6
Views
419
Replies
1
Views
629
Replies
10
Views
1K
Replies
12
Views
660

1,191,187
Messages
5,985,191
Members
439,947
Latest member
fabiannic

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