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>
[TD="align: center"]1[/TD]
[TD="align: center"]2[/TD]
[TD="align: center"]3[/TD]
[TD="align: center"]4[/TD]
[TD="align: center"]5[/TD]
[TD="align: center"]6[/TD]
[TD="align: center"]7[/TD]
[TD="align: center"]8[/TD]
</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>
[TD="align: center"]1[/TD]
[TD="align: center"]2[/TD]
[TD="align: right"]2[/TD]
[TD="align: center"]3[/TD]
[TD="align: right"]2[/TD]
[TD="align: center"]4[/TD]
[TD="align: right"]2[/TD]
[TD="align: center"]5[/TD]
[TD="align: right"]1[/TD]
[TD="align: center"]6[/TD]
[TD="align: right"]1[/TD]
[TD="align: center"]7[/TD]
[TD="align: right"]1[/TD]
[TD="align: center"]8[/TD]
[TD="align: right"]1[/TD]
[TD="align: center"]9[/TD]
[TD="align: right"]2[/TD]
[TD="align: center"]10[/TD]
[TD="align: right"]1[/TD]
[TD="align: center"]11[/TD]
[TD="align: right"]1[/TD]
[TD="align: center"]12[/TD]
[TD="align: right"]1[/TD]
[TD="align: center"]13[/TD]
[TD="align: right"]1[/TD]
[TD="align: center"]14[/TD]
[TD="align: right"]1[/TD]
[TD="align: center"]15[/TD]
[TD="align: right"]2[/TD]
[TD="align: center"]16[/TD]
[TD="align: right"]1[/TD]
[TD="align: center"]17[/TD]
[TD="align: right"]3[/TD]
[TD="align: center"]18[/TD]
[TD="align: right"]3[/TD]
[TD="align: center"]19[/TD]
[TD="align: right"]2[/TD]
[TD="align: center"]20[/TD]
[TD="align: right"]2[/TD]
[TD="align: center"]21[/TD]
[TD="align: right"]2[/TD]
[TD="align: center"]22[/TD]
[TD="align: right"]1[/TD]
[TD="align: center"]23[/TD]
[TD="align: right"]1[/TD]
[TD="align: center"]24[/TD]
[TD="align: right"]1[/TD]
</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 | |
---|---|---|---|---|---|---|
Dt | Sb1 | Sb2 | Sb3 | Sb4 | Sb5 | |
Am | ENC | HIC | POS | ECO | CPU | |
Am | ENC | HIC | POS | MAS | MAT | |
Bw | ENC | HIC | POS | ECO | CPU | |
Bw | ENC | HOS | PHE | CHE | BIO | |
Jn | ENC | HIC | POS | ECO | CPU | |
Jn | ENC | HIC | POS | ECO | CPU | |
Jn | ENC | HIC | MAT | OSH | OSE |
<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]1[/TD]
[TD="align: center"]2[/TD]
[TD="align: center"]3[/TD]
[TD="align: center"]4[/TD]
[TD="align: center"]5[/TD]
[TD="align: center"]6[/TD]
[TD="align: center"]7[/TD]
[TD="align: center"]8[/TD]
</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 | |
---|---|---|---|
Dt | Sb | Cnt | |
Am | ENC | ||
Am | HIC | ||
Am | POS | ||
Am | ECO | ||
Am | CPU | ||
Am | MAS | ||
Am | MAT | ||
Bw | ENC | ||
Bw | HIC | ||
Bw | POS | ||
Bw | PHE | ||
Bw | ECO | ||
Bw | CPU | ||
Bw | CHE | ||
Bw | BIO | ||
Jn | ENC | ||
Jn | HIC | ||
Jn | POS | ||
Jn | ECO | ||
Jn | CPU | ||
Jn | MAT | ||
Jn | OSH | ||
Jn | OSE |
<colgroup><col style="width: 25pxpx"><col><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]1[/TD]
[TD="align: center"]2[/TD]
[TD="align: right"]2[/TD]
[TD="align: center"]3[/TD]
[TD="align: right"]2[/TD]
[TD="align: center"]4[/TD]
[TD="align: right"]2[/TD]
[TD="align: center"]5[/TD]
[TD="align: right"]1[/TD]
[TD="align: center"]6[/TD]
[TD="align: right"]1[/TD]
[TD="align: center"]7[/TD]
[TD="align: right"]1[/TD]
[TD="align: center"]8[/TD]
[TD="align: right"]1[/TD]
[TD="align: center"]9[/TD]
[TD="align: right"]2[/TD]
[TD="align: center"]10[/TD]
[TD="align: right"]1[/TD]
[TD="align: center"]11[/TD]
[TD="align: right"]1[/TD]
[TD="align: center"]12[/TD]
[TD="align: right"]1[/TD]
[TD="align: center"]13[/TD]
[TD="align: right"]1[/TD]
[TD="align: center"]14[/TD]
[TD="align: right"]1[/TD]
[TD="align: center"]15[/TD]
[TD="align: right"]2[/TD]
[TD="align: center"]16[/TD]
[TD="align: right"]1[/TD]
[TD="align: center"]17[/TD]
[TD="align: right"]3[/TD]
[TD="align: center"]18[/TD]
[TD="align: right"]3[/TD]
[TD="align: center"]19[/TD]
[TD="align: right"]2[/TD]
[TD="align: center"]20[/TD]
[TD="align: right"]2[/TD]
[TD="align: center"]21[/TD]
[TD="align: right"]2[/TD]
[TD="align: center"]22[/TD]
[TD="align: right"]1[/TD]
[TD="align: center"]23[/TD]
[TD="align: right"]1[/TD]
[TD="align: center"]24[/TD]
[TD="align: right"]1[/TD]
</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