Sharid
Well-known Member
- Joined
- Apr 22, 2007
- Messages
- 1,066
- Office Version
- 2016
- Platform
- Windows
Please could someone help. I have been doing this by hand, I'm hoping a vba code can do this
I am pulling data from the web into a spreedsheet, I need a VBA code that will clean the data so it is formated better, see below
I have several columns about 20 and to the last row with data in it. Row 1 has the headings so data goes into row 2 down
From This
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[/TR]
[TR]
[TD]
Joe Blogs[/TD]
[TD]Address Line 1
Address Line 2
Address Line 3
Address Line 4
Address Line 5[/TD]
[TD]Tel 0111
111 2222[/TD]
[TD]
London[/TD]
[TD]UK
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
To This
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]A
[/TD]
[TD]B
[/TD]
[TD]C
[/TD]
[TD]D
[/TD]
[TD]E
[/TD]
[/TR]
[TR]
[TD]Joe Blogs
[/TD]
[TD]Address Line 1
Address Line 2
Address Line 3
Address Line 4
Address Line 5[/TD]
[TD]Tel 011111 222
[/TD]
[TD]London
[/TD]
[TD]UK
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Thanks
I am pulling data from the web into a spreedsheet, I need a VBA code that will clean the data so it is formated better, see below
I have several columns about 20 and to the last row with data in it. Row 1 has the headings so data goes into row 2 down
From This
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[/TR]
[TR]
[TD]
Joe Blogs[/TD]
[TD]Address Line 1
Address Line 2
Address Line 3
Address Line 4
Address Line 5[/TD]
[TD]Tel 0111
111 2222[/TD]
[TD]
London[/TD]
[TD]UK
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
To This
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]A
[/TD]
[TD]B
[/TD]
[TD]C
[/TD]
[TD]D
[/TD]
[TD]E
[/TD]
[/TR]
[TR]
[TD]Joe Blogs
[/TD]
[TD]Address Line 1
Address Line 2
Address Line 3
Address Line 4
Address Line 5[/TD]
[TD]Tel 011111 222
[/TD]
[TD]London
[/TD]
[TD]UK
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Thanks