So I use have this dataset:
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Name with Share & Value[/TD]
[/TR]
[TR]
[TD][TABLE="width: 502"]
<tbody>[TR="class: grid"]
[TD="width: 502, align: left"] A.H. Belo Corp. Class A........................... 100,069 598,413[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD][TABLE="class: grid, width: 502"]
<tbody>[TR]
[TD="width: 502, align: left"] Aaron's, Inc...................................... 376,985 8,625,417[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD][TABLE="width: 502"]
<tbody>[TR="class: grid"]
[TD="width: 502, align: left"]# Abercrombie & Fitch Co. Class A................... 336,209 8,822,124[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD][TABLE="width: 502"]
<tbody>[TR="class: grid"]
[TD="width: 502, align: left"] AMC Entertainment Holdings, Inc. Class A.......... 10,048 219,046[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD][TABLE="width: 502"]
<tbody>[TR="class: grid"]
[TD="width: 502, align: left"] AMCON Distributing Co............................. 850 61,434[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD][TABLE="width: 502"]
<tbody>[TR="class: grid"]
[TD="width: 502, align: left"]#* America's Car-Mart, Inc........................... 58,111 1,363,284[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD][TABLE="width: 502"]
<tbody>[TR="class: grid"]
[TD="width: 502, align: left"]# American Eagle Outfitters, Inc.................... 604,752 8,853,569[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD][TABLE="width: 502"]
<tbody>[TR="class: grid"]
[TD="width: 502, align: left"]#* American Public Education, Inc.................... 93,145 1,469,828[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD][TABLE="width: 502"]
<tbody>[TR="class: grid"]
[TD="width: 502, align: left"]#* Apollo Education Group, Inc....................... 267,612 2,124,839[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]
So I have to divide this data into three columns: Name, Share and Value
I used the following functions to get the data:
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Name[/TD]
[TD]Share & Value[/TD]
[TD]Share[/TD]
[TD]Value[/TD]
[/TR]
[TR]
[TD]=TRIM(LEFT(SUBSTITUTE(A2,"..",REPT(" ",99)),99))[/TD]
[TD]=TRIM(RIGHT(SUBSTITUTE(A2,".",REPT(" ",99)),99))[/TD]
[TD]=TRIM(LEFT(SUBSTITUTE(B2," ",REPT(" ",99)),99))[/TD]
[TD]=TRIM(RIGHT(SUBSTITUTE(A2," ",REPT(" ",99)),99))[/TD]
[/TR]
</tbody>[/TABLE]
To get these data:
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Name[/TD]
[TD]Share & Value[/TD]
[TD]Share[/TD]
[TD]Value[/TD]
[/TR]
[TR]
[TD][TABLE="width: 273"]
<tbody>[TR="class: grid"]
[TD="width: 273, align: left"]#* 1-800-Flowers.com, Inc. Class A[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 141"]
<tbody>[TR="class: grid"]
[TD="width: 141, align: left"]219,113 $ 2,180,174[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 72"]
<tbody>[TR="class: grid"]
[TD="width: 72, align: left"]219,113[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 85"]
<tbody>[TR="class: grid"]
[TD="width: 85, align: left"]2,180,174[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]
But as far as I have googled there is not an option in VBA to use the LEFT or RIGHT function to read data eg.: after the first '..' happens from the right side.
Is there any way it could be done?
If you have questions let me know I will elaborate.
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Name with Share & Value[/TD]
[/TR]
[TR]
[TD][TABLE="width: 502"]
<tbody>[TR="class: grid"]
[TD="width: 502, align: left"] A.H. Belo Corp. Class A........................... 100,069 598,413[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD][TABLE="class: grid, width: 502"]
<tbody>[TR]
[TD="width: 502, align: left"] Aaron's, Inc...................................... 376,985 8,625,417[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD][TABLE="width: 502"]
<tbody>[TR="class: grid"]
[TD="width: 502, align: left"]# Abercrombie & Fitch Co. Class A................... 336,209 8,822,124[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD][TABLE="width: 502"]
<tbody>[TR="class: grid"]
[TD="width: 502, align: left"] AMC Entertainment Holdings, Inc. Class A.......... 10,048 219,046[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD][TABLE="width: 502"]
<tbody>[TR="class: grid"]
[TD="width: 502, align: left"] AMCON Distributing Co............................. 850 61,434[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD][TABLE="width: 502"]
<tbody>[TR="class: grid"]
[TD="width: 502, align: left"]#* America's Car-Mart, Inc........................... 58,111 1,363,284[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD][TABLE="width: 502"]
<tbody>[TR="class: grid"]
[TD="width: 502, align: left"]# American Eagle Outfitters, Inc.................... 604,752 8,853,569[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD][TABLE="width: 502"]
<tbody>[TR="class: grid"]
[TD="width: 502, align: left"]#* American Public Education, Inc.................... 93,145 1,469,828[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD][TABLE="width: 502"]
<tbody>[TR="class: grid"]
[TD="width: 502, align: left"]#* Apollo Education Group, Inc....................... 267,612 2,124,839[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]
So I have to divide this data into three columns: Name, Share and Value
I used the following functions to get the data:
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Name[/TD]
[TD]Share & Value[/TD]
[TD]Share[/TD]
[TD]Value[/TD]
[/TR]
[TR]
[TD]=TRIM(LEFT(SUBSTITUTE(A2,"..",REPT(" ",99)),99))[/TD]
[TD]=TRIM(RIGHT(SUBSTITUTE(A2,".",REPT(" ",99)),99))[/TD]
[TD]=TRIM(LEFT(SUBSTITUTE(B2," ",REPT(" ",99)),99))[/TD]
[TD]=TRIM(RIGHT(SUBSTITUTE(A2," ",REPT(" ",99)),99))[/TD]
[/TR]
</tbody>[/TABLE]
To get these data:
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Name[/TD]
[TD]Share & Value[/TD]
[TD]Share[/TD]
[TD]Value[/TD]
[/TR]
[TR]
[TD][TABLE="width: 273"]
<tbody>[TR="class: grid"]
[TD="width: 273, align: left"]#* 1-800-Flowers.com, Inc. Class A[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 141"]
<tbody>[TR="class: grid"]
[TD="width: 141, align: left"]219,113 $ 2,180,174[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 72"]
<tbody>[TR="class: grid"]
[TD="width: 72, align: left"]219,113[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 85"]
<tbody>[TR="class: grid"]
[TD="width: 85, align: left"]2,180,174[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]
But as far as I have googled there is not an option in VBA to use the LEFT or RIGHT function to read data eg.: after the first '..' happens from the right side.
Is there any way it could be done?
If you have questions let me know I will elaborate.