smide
Board Regular
- Joined
- Dec 20, 2015
- Messages
- 164
- Office Version
- 2016
- Platform
- Windows
Hello.
In cell A1 (Sheet 1) I'm receiving a huge HTML code. I need to extract somehow values for 'top' and 'left' without % suffix.
for: style="top: 54%; left: 13%; I need only 54 and 13
Results should be placed in column B for top values (B2:B300) and column C for left values (C2:C300).
example.
HTML in cell A1: style="top: 69%; left: 8%; background-color: rgb(0, 255, 255); style="top: 3%; left: 61%;....
Results after macro run (Sheet 1):
[TABLE="class: grid, width: 500, align: center"]
<tbody>[TR]
[TD][/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]C[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]style="top: 69%; left: 8%; background-color: rgb(0, 255, 255); style="top: 3%; left: 61%;....[/TD]
[TD]Top[/TD]
[TD]Left[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD][/TD]
[TD="align: center"]69[/TD]
[TD="align: center"]8[/TD]
[/TR]
[TR]
[TD="align: center"]3[/TD]
[TD="align: center"][/TD]
[TD="align: center"]3[/TD]
[TD="align: center"]61[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD][/TD]
[TD="align: center"]....[/TD]
[TD="align: center"]....[/TD]
[/TR]
[TR]
[TD="align: center"]5[/TD]
[TD="align: center"][/TD]
[TD="align: center"]....[/TD]
[TD="align: center"]....[/TD]
[/TR]
</tbody>[/TABLE]
In cell A1 (Sheet 1) I'm receiving a huge HTML code. I need to extract somehow values for 'top' and 'left' without % suffix.
for: style="top: 54%; left: 13%; I need only 54 and 13
Results should be placed in column B for top values (B2:B300) and column C for left values (C2:C300).
example.
HTML in cell A1: style="top: 69%; left: 8%; background-color: rgb(0, 255, 255); style="top: 3%; left: 61%;....
Results after macro run (Sheet 1):
[TABLE="class: grid, width: 500, align: center"]
<tbody>[TR]
[TD][/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]C[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]style="top: 69%; left: 8%; background-color: rgb(0, 255, 255); style="top: 3%; left: 61%;....[/TD]
[TD]Top[/TD]
[TD]Left[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD][/TD]
[TD="align: center"]69[/TD]
[TD="align: center"]8[/TD]
[/TR]
[TR]
[TD="align: center"]3[/TD]
[TD="align: center"][/TD]
[TD="align: center"]3[/TD]
[TD="align: center"]61[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD][/TD]
[TD="align: center"]....[/TD]
[TD="align: center"]....[/TD]
[/TR]
[TR]
[TD="align: center"]5[/TD]
[TD="align: center"][/TD]
[TD="align: center"]....[/TD]
[TD="align: center"]....[/TD]
[/TR]
</tbody>[/TABLE]