Ombir
Active Member
- Joined
- Oct 1, 2015
- Messages
- 433
Hi friends,
I have a worksheet shown below.
<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
First I want to find Unique values based on Column 1 and Column(2-6) then count these values as shown below.
<colgroup><col style="width: 25pxpx"><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
I am able to code this in Visual Fox Pro but can anybody help me with some VBA code to achieve this. Thanks
I have a worksheet shown below.
A | B | C | D | E | F | |
---|---|---|---|---|---|---|
1 | Dt | Sb1 | Sb2 | Sb3 | Sb4 | Sb5 |
2 | Am | ENC | HIC | POS | ECO | CPU |
3 | Am | ENC | HIC | POS | MAS | MAT |
4 | Bw | ENC | HIC | POS | ECO | CPU |
5 | Bw | ENC | HOS | PHE | CHE | BIO |
6 | Jn | ENC | HIC | POS | ECO | CPU |
7 | Jn | ENC | HIC | POS | ECO | CPU |
8 | Jn | ENC | HIC | MAT | OSH | OSE |
<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet3
First I want to find Unique values based on Column 1 and Column(2-6) then count these values as shown below.
H | I | J | |
---|---|---|---|
1 | Dt | Sb | Cnt |
2 | Am | ENC | 2 |
3 | Am | HIC | 2 |
4 | Am | POS | 2 |
5 | Am | ECO | 1 |
6 | Am | CPU | 1 |
7 | Am | MAS | 1 |
8 | Am | MAT | 1 |
9 | Bw | ENC | 2 |
10 | Bw | HIC | 1 |
11 | Bw | POS | 1 |
12 | Bw | PHE | 1 |
13 | Bw | ECO | 1 |
14 | Bw | CPU | 1 |
15 | Bw | CHE | 2 |
16 | Bw | BIO | 1 |
17 | Jn | ENC | 3 |
18 | Jn | HIC | 3 |
19 | Jn | POS | 2 |
20 | Jn | ECO | 2 |
21 | Jn | CPU | 2 |
22 | Jn | MAT | 1 |
23 | Jn | OSH | 1 |
24 | Jn | OSE | 1 |
<colgroup><col style="width: 25pxpx"><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet3
I am able to code this in Visual Fox Pro but can anybody help me with some VBA code to achieve this. Thanks