Hi,
I have some repeated data from my database. Is it possible to make it in one row using macro.
For example, for same data user, date login & remarks will loop at next column instead of next row.
Could anyone assist me.
Current data
[TABLE="width: 387"]
<tbody>[TR]
[TD]firstname[/TD]
[TD]lastname[/TD]
[TD] id[/TD]
[TD]datelogin [/TD]
[TD]remarks[/TD]
[/TR]
[TR]
[TD]tom[/TD]
[TD]andrew[/TD]
[TD]100010[/TD]
[TD]14/1/2019[/TD]
[TD]enroll new account[/TD]
[/TR]
[TR]
[TD]tom[/TD]
[TD]andrew[/TD]
[TD]100010[/TD]
[TD]15/1/2019[/TD]
[TD]update details[/TD]
[/TR]
[TR]
[TD]vincent[/TD]
[TD]lew[/TD]
[TD]100020[/TD]
[TD]14/1/2019[/TD]
[TD]enroll new account[/TD]
[/TR]
[TR]
[TD]felicia[/TD]
[TD]tan[/TD]
[TD]100030[/TD]
[TD]14/1/2019[/TD]
[TD]enroll new account[/TD]
[/TR]
[TR]
[TD]felicia[/TD]
[TD]tan[/TD]
[TD]100030[/TD]
[TD]15/1/2019[/TD]
[TD]update details[/TD]
[/TR]
[TR]
[TD]felicia[/TD]
[TD]tan[/TD]
[TD]100030[/TD]
[TD]15/1/2019[/TD]
[TD]set appointment[/TD]
[/TR]
</tbody>[/TABLE]
Outcome(using macro/vba)
[TABLE="width: 776"]
<tbody>[TR]
[TD]firstname[/TD]
[TD]lastname[/TD]
[TD]id[/TD]
[TD]datelogin[/TD]
[TD]remarks[/TD]
[TD]datelogin[/TD]
[TD]remarks[/TD]
[TD]datelogin[/TD]
[TD]remarks[/TD]
[/TR]
[TR]
[TD]tom[/TD]
[TD]andrew[/TD]
[TD]100010[/TD]
[TD]14/1/2019[/TD]
[TD]enroll new account[/TD]
[TD]15/1/2019[/TD]
[TD]update details[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]vincent[/TD]
[TD]lew[/TD]
[TD]100020[/TD]
[TD]14/1/2019[/TD]
[TD]enroll new account[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]felicia[/TD]
[TD]tan[/TD]
[TD]100030[/TD]
[TD]14/1/2019[/TD]
[TD]enroll new account[/TD]
[TD]15/1/2019[/TD]
[TD]update details[/TD]
[TD]15/1/2019[/TD]
[TD]set appointment[/TD]
[/TR]
</tbody>[/TABLE]
I have some repeated data from my database. Is it possible to make it in one row using macro.
For example, for same data user, date login & remarks will loop at next column instead of next row.
Could anyone assist me.
Current data
[TABLE="width: 387"]
<tbody>[TR]
[TD]firstname[/TD]
[TD]lastname[/TD]
[TD] id[/TD]
[TD]datelogin [/TD]
[TD]remarks[/TD]
[/TR]
[TR]
[TD]tom[/TD]
[TD]andrew[/TD]
[TD]100010[/TD]
[TD]14/1/2019[/TD]
[TD]enroll new account[/TD]
[/TR]
[TR]
[TD]tom[/TD]
[TD]andrew[/TD]
[TD]100010[/TD]
[TD]15/1/2019[/TD]
[TD]update details[/TD]
[/TR]
[TR]
[TD]vincent[/TD]
[TD]lew[/TD]
[TD]100020[/TD]
[TD]14/1/2019[/TD]
[TD]enroll new account[/TD]
[/TR]
[TR]
[TD]felicia[/TD]
[TD]tan[/TD]
[TD]100030[/TD]
[TD]14/1/2019[/TD]
[TD]enroll new account[/TD]
[/TR]
[TR]
[TD]felicia[/TD]
[TD]tan[/TD]
[TD]100030[/TD]
[TD]15/1/2019[/TD]
[TD]update details[/TD]
[/TR]
[TR]
[TD]felicia[/TD]
[TD]tan[/TD]
[TD]100030[/TD]
[TD]15/1/2019[/TD]
[TD]set appointment[/TD]
[/TR]
</tbody>[/TABLE]
Outcome(using macro/vba)
[TABLE="width: 776"]
<tbody>[TR]
[TD]firstname[/TD]
[TD]lastname[/TD]
[TD]id[/TD]
[TD]datelogin[/TD]
[TD]remarks[/TD]
[TD]datelogin[/TD]
[TD]remarks[/TD]
[TD]datelogin[/TD]
[TD]remarks[/TD]
[/TR]
[TR]
[TD]tom[/TD]
[TD]andrew[/TD]
[TD]100010[/TD]
[TD]14/1/2019[/TD]
[TD]enroll new account[/TD]
[TD]15/1/2019[/TD]
[TD]update details[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]vincent[/TD]
[TD]lew[/TD]
[TD]100020[/TD]
[TD]14/1/2019[/TD]
[TD]enroll new account[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]felicia[/TD]
[TD]tan[/TD]
[TD]100030[/TD]
[TD]14/1/2019[/TD]
[TD]enroll new account[/TD]
[TD]15/1/2019[/TD]
[TD]update details[/TD]
[TD]15/1/2019[/TD]
[TD]set appointment[/TD]
[/TR]
</tbody>[/TABLE]