Sheet1 would look like following
[TABLE="width: 440"]
<colgroup><col width="297" style="width: 223pt;"><col width="97" style="width: 73pt;"><col width="46" style="width: 35pt;"></colgroup><tbody>[TR]
[TD="class: xl678021, width: 297, align: center"]A[/TD]
[TD="class: xl748021, width: 97, align: center"]B[/TD]
[TD="class: xl758021, width: 46, align: center"]C[/TD]
[/TR]
[TR]
[TD="class: xl688021, align: center"]CODES[/TD]
[TD="class: xl658021, align: center"]FINAL OUTPUT[/TD]
[TD="class: xl768021, align: center"]TOTAL[/TD]
[/TR]
[TR]
[TD="class: xl708021"]991121QR5, 991121XSX, 991234SSC, 991121SDF[/TD]
[TD="class: xl668021"] [/TD]
[TD="class: xl698021"] [/TD]
[/TR]
[TR]
[TD="class: xl708021"]991121QR5, 991121XSX, 991234SSC[/TD]
[TD="class: xl668021"] [/TD]
[TD="class: xl698021"] [/TD]
[/TR]
[TR]
[TD="class: xl718021"]991121QR5, 991121XSX, 991234SSC, 991121SDF[/TD]
[TD="class: xl738021"] [/TD]
[TD="class: xl728021"] [/TD]
[/TR]
</tbody>[/TABLE]
Sheet2 has following Table
[TABLE="width: 142"]
<colgroup><col width="87" style="width: 65pt;"><col width="55" style="width: 41pt;"></colgroup><tbody>[TR]
[TD="class: xl6514607, width: 87, align: center"]A[/TD]
[TD="class: xl6714607, width: 55, align: center"]B[/TD]
[/TR]
[TR]
[TD="class: xl6614607, align: center"]CODES[/TD]
[TD="class: xl6814607, align: center"]Value[/TD]
[/TR]
[TR]
[TD="class: xl6914607"]991121QR5 [/TD]
[TD="class: xl7014607, align: right"]100100[/TD]
[/TR]
[TR]
[TD="class: xl6914607"]991121SDF [/TD]
[TD="class: xl7014607, align: right"]121212[/TD]
[/TR]
[TR]
[TD="class: xl6914607"]991234SSC [/TD]
[TD="class: xl7014607, align: right"]123456[/TD]
[/TR]
[TR]
[TD="class: xl7114607"]991121XSX [/TD]
[TD="class: xl7214607, align: right"]888888[/TD]
[/TR]
</tbody>[/TABLE]
I want Final Output as foll
[TABLE="width: 561"]
<colgroup><col width="297" style="width: 223pt;"><col width="200" style="width: 150pt;"><col width="64" style="width: 48pt;"></colgroup><tbody>[TR]
[TD="class: xl653753, width: 297, align: center"]A[/TD]
[TD="class: xl663753, width: 200, align: center"]B[/TD]
[TD="class: xl673753, width: 64, align: center"]C[/TD]
[/TR]
[TR]
[TD="class: xl683753, align: center"]CODES[/TD]
[TD="class: xl693753, align: center"]FINAL OUTPUT[/TD]
[TD="class: xl703753, align: center"]TOTAL[/TD]
[/TR]
[TR]
[TD="class: xl713753"]991121QR5, 991121XSX, 991234SSC, 991121SDF[/TD]
[TD="class: xl723753"]100100, 888888, 123456, 121212[/TD]
[TD="class: xl733753, align: right"]1233656[/TD]
[/TR]
[TR]
[TD="class: xl713753"]991121QR5, 991121XSX, 991234SSC[/TD]
[TD="class: xl723753"]100100, 888888, 123456[/TD]
[TD="class: xl733753, align: right"]1112444[/TD]
[/TR]
[TR]
[TD="class: xl743753"]991121QR5, 991121XSX, 991234SSC, 991121SDF[/TD]
[TD="class: xl753753"]100100, 888888, 123456, 121212[/TD]
[TD="class: xl763753, align: right"]1233656[/TD]
[/TR]
</tbody>[/TABLE]
I want to vlookup each value after comma+space in sheet1 with the table in sheet2 and show the value as in the final output coloumn with comma+space. Also I want to add up all the values after comma+space in the Total coloumn. All this has to repeat till the last comma+space in the series.