Hi all
I'm trying to setup a countif formula, but I want it only count if it's a unique match in the previous column...
for example: column A is used for category; and column B is what I want to count, but I would like it say: only 1 B for C1; Only 1 C for C1; Only 1 C for C2... etc (i've published an example below)
The data itself going in to a pivot table by Col1 and then Col2 as row headers with Sum of Col3.
What would be the best way to go about this?
Cheers
Example:
<table style="border-collapse: collapse; table-layout: fixed; width: 192pt;" border="0" cellpadding="0" cellspacing="0" width="256"><tbody><tr style="height: 15pt;" height="20"><td class="xl6418278" style="height: 15pt; width: 48pt;" height="20" width="64">Col1</td> <td class="xl6418278" style="border-left: medium none; width: 48pt;" width="64">Col2</td> <td class="xl6418278" style="border-left: medium none; width: 48pt;" width="64">Col3</td> <td class="xl6418278" style="border-left: medium none; width: 48pt;" width="64">Count</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl6418278" style="height: 15pt; border-top: medium none;" height="20">C1</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;">A</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;">1</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;"> </td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl6418278" style="height: 15pt; border-top: medium none;" height="20">C1</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;">B</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;">5</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;"> </td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl6418278" style="height: 15pt; border-top: medium none;" height="20">C1</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;">C</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;">3</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;"> </td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl6418278" style="height: 15pt; border-top: medium none;" height="20">C1</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;">B</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;">2</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;"> </td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl6418278" style="height: 15pt; border-top: medium none;" height="20">C1</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;">C</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;">1</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;"> </td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl6418278" style="height: 15pt; border-top: medium none;" height="20">C2</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;">A</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;">8</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;"> </td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl6418278" style="height: 15pt; border-top: medium none;" height="20">C2</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;">C</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;">9</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;"> </td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl6418278" style="height: 15pt; border-top: medium none;" height="20">C2</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;">A</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;">2</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;"> </td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl6418278" style="height: 15pt; border-top: medium none;" height="20">C3</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;">C</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;">4</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;"> </td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl6418278" style="height: 15pt; border-top: medium none;" height="20">C3</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;">C</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;">8</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;"> </td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl6418278" style="height: 15pt; border-top: medium none;" height="20">C3</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;">B</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;">7</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;"> </td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl6418278" style="height: 15pt; border-top: medium none;" height="20">C3</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;">A</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;">2</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;"> </td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl6418278" style="height: 15pt; border-top: medium none;" height="20">C3</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;">C</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;">3</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;"> </td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl6418278" style="height: 15pt; border-top: medium none;" height="20">C3</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;">A</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;">6</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;"> </td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl6418278" style="height: 15pt; border-top: medium none;" height="20">C3</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;">C</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;">56</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;"> </td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl6418278" style="height: 15pt; border-top: medium none;" height="20">C3</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;">B</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;">4</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;"> </td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl6418278" style="height: 15pt; border-top: medium none;" height="20">C4</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;">C</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;">2</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;"> </td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl6418278" style="height: 15pt; border-top: medium none;" height="20">C5</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;">A</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;">7</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;"> </td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl6418278" style="height: 15pt; border-top: medium none;" height="20">C5</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;">C</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;">89</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;"> </td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl6418278" style="height: 15pt; border-top: medium none;" height="20">C5</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;">A</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;">4</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;"> </td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl6418278" style="height: 15pt; border-top: medium none;" height="20">C5</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;">C</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;">2</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;"> </td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl6418278" style="height: 15pt; border-top: medium none;" height="20">C5</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;">C</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;">2</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;"> </td></tr></tbody></table>
I'm trying to setup a countif formula, but I want it only count if it's a unique match in the previous column...
for example: column A is used for category; and column B is what I want to count, but I would like it say: only 1 B for C1; Only 1 C for C1; Only 1 C for C2... etc (i've published an example below)
The data itself going in to a pivot table by Col1 and then Col2 as row headers with Sum of Col3.
What would be the best way to go about this?
Cheers
Example:
<table style="border-collapse: collapse; table-layout: fixed; width: 192pt;" border="0" cellpadding="0" cellspacing="0" width="256"><tbody><tr style="height: 15pt;" height="20"><td class="xl6418278" style="height: 15pt; width: 48pt;" height="20" width="64">Col1</td> <td class="xl6418278" style="border-left: medium none; width: 48pt;" width="64">Col2</td> <td class="xl6418278" style="border-left: medium none; width: 48pt;" width="64">Col3</td> <td class="xl6418278" style="border-left: medium none; width: 48pt;" width="64">Count</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl6418278" style="height: 15pt; border-top: medium none;" height="20">C1</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;">A</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;">1</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;"> </td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl6418278" style="height: 15pt; border-top: medium none;" height="20">C1</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;">B</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;">5</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;"> </td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl6418278" style="height: 15pt; border-top: medium none;" height="20">C1</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;">C</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;">3</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;"> </td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl6418278" style="height: 15pt; border-top: medium none;" height="20">C1</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;">B</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;">2</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;"> </td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl6418278" style="height: 15pt; border-top: medium none;" height="20">C1</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;">C</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;">1</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;"> </td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl6418278" style="height: 15pt; border-top: medium none;" height="20">C2</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;">A</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;">8</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;"> </td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl6418278" style="height: 15pt; border-top: medium none;" height="20">C2</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;">C</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;">9</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;"> </td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl6418278" style="height: 15pt; border-top: medium none;" height="20">C2</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;">A</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;">2</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;"> </td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl6418278" style="height: 15pt; border-top: medium none;" height="20">C3</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;">C</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;">4</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;"> </td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl6418278" style="height: 15pt; border-top: medium none;" height="20">C3</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;">C</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;">8</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;"> </td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl6418278" style="height: 15pt; border-top: medium none;" height="20">C3</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;">B</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;">7</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;"> </td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl6418278" style="height: 15pt; border-top: medium none;" height="20">C3</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;">A</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;">2</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;"> </td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl6418278" style="height: 15pt; border-top: medium none;" height="20">C3</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;">C</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;">3</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;"> </td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl6418278" style="height: 15pt; border-top: medium none;" height="20">C3</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;">A</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;">6</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;"> </td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl6418278" style="height: 15pt; border-top: medium none;" height="20">C3</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;">C</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;">56</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;"> </td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl6418278" style="height: 15pt; border-top: medium none;" height="20">C3</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;">B</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;">4</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;"> </td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl6418278" style="height: 15pt; border-top: medium none;" height="20">C4</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;">C</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;">2</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;"> </td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl6418278" style="height: 15pt; border-top: medium none;" height="20">C5</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;">A</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;">7</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;"> </td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl6418278" style="height: 15pt; border-top: medium none;" height="20">C5</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;">C</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;">89</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;"> </td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl6418278" style="height: 15pt; border-top: medium none;" height="20">C5</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;">A</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;">4</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;"> </td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl6418278" style="height: 15pt; border-top: medium none;" height="20">C5</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;">C</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;">2</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;"> </td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl6418278" style="height: 15pt; border-top: medium none;" height="20">C5</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;">C</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;">2</td> <td class="xl6418278" style="border-top: medium none; border-left: medium none;"> </td></tr></tbody></table>