Hi All,
I am new to VBA programming and I working with a Excel which has a lot many duplicate records. The data in the excel have indefinite records.
The requirement is that I need to remove duplicate rows based multiple columns and concatenate the content of a unique column. I am able to remove duplicate rows through VBA but finding difficulty in concatenating the Unique column.
Sample Input data :-
Output :-
Please note the duplicate row needs to be removed based on the column DIAG,CORP,PRODUCT,FORM,SALES. The concatenation needs to be
done on the basis on MOLECULE Column. (only Unique values)
Please help me in doing the same using VBA.
Thanks in advance.
Regards,
Gauraw
I am new to VBA programming and I working with a Excel which has a lot many duplicate records. The data in the excel have indefinite records.
The requirement is that I need to remove duplicate rows based multiple columns and concatenate the content of a unique column. I am able to remove duplicate rows through VBA but finding difficulty in concatenating the Unique column.
Sample Input data :-
COUNTRY | DIAG | CORP | PRODUCT | FORM | MOLECULE | SALES |
US | D1 | C1 | P1 | F1 | M1 | 123 |
US | D1 | C1 | P1 | F1 | M2 | 123 |
US | D2 | C2 | P2 | F2 | M11 | 456 |
US | D2 | C2 | P2 | F2 | M12 | 456 |
US | D2 | C2 | P2 | F2 | M13 | 456 |
US | D3 | C3 | P3 | F3 | M23 | 89 |
US | D3 | C3 | P3 | F3 | M23 | 89 |
Output :-
COUNTRY | DIAG | CORP | PRODUCT | FORM | MOLECULE | SALES |
US | D1 | C1 | P1 | F1 | M1+M2 | 123 |
US | D2 | C2 | P2 | F2 | M11+M12+M13 | 456 |
US | D3 | C3 | P3 | F3 | M23 | 89 |
Please note the duplicate row needs to be removed based on the column DIAG,CORP,PRODUCT,FORM,SALES. The concatenation needs to be
done on the basis on MOLECULE Column. (only Unique values)
Please help me in doing the same using VBA.
Thanks in advance.
Regards,
Gauraw