Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Grouping Same ID with Multiple Rows to one Row

Status
Not open for further replies.

osimini1

MIS
Jun 9, 2008
29
US
Please can some help to direct or point me to on how to solve this problem. This is probably a simple problem but some how i am lost. Pasted below are two tables. Table 1 is now the data is now and table 2 is the expected result. I want to group the fields T_Code and G_code by ID. All to be in one row.

I will appreciate any help. Solution either in by VBA is ok.

Thanks



TABLE 1: NOT GROUPED
ID T_CODE G_Code
9128 HF JKP
2849 HF JKP
2902 HF JKP
3008 HF JKP
4900 HF JKP
9128 KT HSG
2849 KT HSG
2902 KT HSG
3008 KT HSG
4901 KT HSG
9128 MG XSG
2849 MG XSG
2902 MG XSG
3008 MG XSG
4901 MG XSG
9128 QZ CMG
2849 QZ CMG
2902 QZ CMG
3008 QZ CMG
4901 QZ CMG


ID T_CODE G_Code
9128 HF;KT;MG;QZ JKP;HSG;XGS;CMG
2849 HF;KT;MG;QZ JKP;HSG;XGS;CMG
2902 HF;KT;MG;QZ JKP;HSG;XGS;CMG
3008 HF;KT;MG;QZ JKP;HSG;XGS;CMG
4900 HF;KT;MG;QZ JKP;HSG;XGS;CMG

 
Have a look here:
faq701-4233

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top