kramasundar
New Member
- Joined
- Aug 2, 2010
- Messages
- 18
Hi,
I have an excel file with two sheets S1, S2 (please see below for sample content). All sheets are in one excel file.
For each cell in sheet S1, I have to check whether there is/are an/multiple entry/entries in sheet S2. If there are entries, then I would like to count the unique types and its number of occurrences.
In the example below, in the result sheet, id 123 has 4 rows with the following data
- 2 times Type A
- 2 times Type B
- 1 time Type C
- 1 time Type D
Could you guys please help me?
Thanks and best regards,
R
S1's content is as follows:
[TABLE="width: 87"]
<tbody>[TR]
[TD="align: right"]123[/TD]
[/TR]
[TR]
[TD="align: right"]124[/TD]
[/TR]
[TR]
[TD="align: right"]125[/TD]
[/TR]
[TR]
[TD="align: right"]126[/TD]
[/TR]
[TR]
[TD="align: right"]127[/TD]
[/TR]
[TR]
[TD="align: right"]128[/TD]
[/TR]
[TR]
[TD="align: right"]129[/TD]
[/TR]
</tbody>[/TABLE]
S2's content is as follows:
[TABLE="width: 261"]
<tbody>[TR]
[TD="align: right"]123[/TD]
[TD="width: 87"]text[/TD]
[TD="width: 87"]Type A[/TD]
[/TR]
[TR]
[TD="align: right"]123[/TD]
[TD]text[/TD]
[TD]Type B[/TD]
[/TR]
[TR]
[TD="align: right"]123[/TD]
[TD]text[/TD]
[TD]Type A[/TD]
[/TR]
[TR]
[TD="align: right"]123[/TD]
[TD]text[/TD]
[TD]Type B[/TD]
[/TR]
[TR]
[TD="align: right"]123[/TD]
[TD]text[/TD]
[TD]Type C[/TD]
[/TR]
[TR]
[TD="align: right"]123[/TD]
[TD]text[/TD]
[TD]Type D[/TD]
[/TR]
[TR]
[TD="align: right"]124[/TD]
[TD]text[/TD]
[TD]Type D[/TD]
[/TR]
[TR]
[TD="align: right"]125[/TD]
[TD]text[/TD]
[TD]Type D[/TD]
[/TR]
[TR]
[TD="align: right"]125[/TD]
[TD]text[/TD]
[TD]Type A[/TD]
[/TR]
</tbody>[/TABLE]
I expect a result like below in sheet 3 for e.g.:
[TABLE="width: 261"]
<tbody>[TR]
[TD="align: right"]123[/TD]
[TD="width: 87"]Type A[/TD]
[TD="width: 87, align: right"]2[/TD]
[/TR]
[TR]
[TD="align: right"]123[/TD]
[TD]Type B[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD="align: right"]123[/TD]
[TD]Type C[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD="align: right"]123[/TD]
[TD]Type D[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD="align: right"]124[/TD]
[TD]Type D[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD="align: right"]125[/TD]
[TD]Type D[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD="align: right"]125[/TD]
[TD]Type A[/TD]
[TD="align: right"]1[/TD]
[/TR]
</tbody>[/TABLE]
I have an excel file with two sheets S1, S2 (please see below for sample content). All sheets are in one excel file.
For each cell in sheet S1, I have to check whether there is/are an/multiple entry/entries in sheet S2. If there are entries, then I would like to count the unique types and its number of occurrences.
In the example below, in the result sheet, id 123 has 4 rows with the following data
- 2 times Type A
- 2 times Type B
- 1 time Type C
- 1 time Type D
Could you guys please help me?
Thanks and best regards,
R
S1's content is as follows:
[TABLE="width: 87"]
<tbody>[TR]
[TD="align: right"]123[/TD]
[/TR]
[TR]
[TD="align: right"]124[/TD]
[/TR]
[TR]
[TD="align: right"]125[/TD]
[/TR]
[TR]
[TD="align: right"]126[/TD]
[/TR]
[TR]
[TD="align: right"]127[/TD]
[/TR]
[TR]
[TD="align: right"]128[/TD]
[/TR]
[TR]
[TD="align: right"]129[/TD]
[/TR]
</tbody>[/TABLE]
S2's content is as follows:
[TABLE="width: 261"]
<tbody>[TR]
[TD="align: right"]123[/TD]
[TD="width: 87"]text[/TD]
[TD="width: 87"]Type A[/TD]
[/TR]
[TR]
[TD="align: right"]123[/TD]
[TD]text[/TD]
[TD]Type B[/TD]
[/TR]
[TR]
[TD="align: right"]123[/TD]
[TD]text[/TD]
[TD]Type A[/TD]
[/TR]
[TR]
[TD="align: right"]123[/TD]
[TD]text[/TD]
[TD]Type B[/TD]
[/TR]
[TR]
[TD="align: right"]123[/TD]
[TD]text[/TD]
[TD]Type C[/TD]
[/TR]
[TR]
[TD="align: right"]123[/TD]
[TD]text[/TD]
[TD]Type D[/TD]
[/TR]
[TR]
[TD="align: right"]124[/TD]
[TD]text[/TD]
[TD]Type D[/TD]
[/TR]
[TR]
[TD="align: right"]125[/TD]
[TD]text[/TD]
[TD]Type D[/TD]
[/TR]
[TR]
[TD="align: right"]125[/TD]
[TD]text[/TD]
[TD]Type A[/TD]
[/TR]
</tbody>[/TABLE]
I expect a result like below in sheet 3 for e.g.:
[TABLE="width: 261"]
<tbody>[TR]
[TD="align: right"]123[/TD]
[TD="width: 87"]Type A[/TD]
[TD="width: 87, align: right"]2[/TD]
[/TR]
[TR]
[TD="align: right"]123[/TD]
[TD]Type B[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD="align: right"]123[/TD]
[TD]Type C[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD="align: right"]123[/TD]
[TD]Type D[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD="align: right"]124[/TD]
[TD]Type D[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD="align: right"]125[/TD]
[TD]Type D[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD="align: right"]125[/TD]
[TD]Type A[/TD]
[TD="align: right"]1[/TD]
[/TR]
</tbody>[/TABLE]