parsing lists

Brook70458

New Member
Joined
May 25, 2011
Messages
32
Hi,

It has been some time since my being into developing vba code in Excel. I am [beyond] rusty in my skillset.

I receive a report generated in Excel and need it parsed correctly, and the report appended each time I update it.
(Until I figure out--LEARN--syntax, I would like the append function to be a choice (option).

Example:

Col. D Col. E Col. F
[TABLE="width: 313"]
<tbody>[TR]
[TD]Input Data
[/TD]
[TD] Prefix[/TD]
[TD] Suffix[/TD]
[/TR]
[TR]
[TD]100.100.100.100:100[/TD]
[TD] 100.100.100.100[/TD]
[TD="align: right"]100[/TD]
[/TR]
[TR]
[TD]100.100.100.100:1000 [/TD]
[TD] 100.100.100.100[/TD]
[TD="align: right"] 1000[/TD]
[/TR]
[TR]
[TD]100.100.100.100:10 [/TD]
[TD] 100.100.100.100[/TD]
[TD="align: right"]100[/TD]
[/TR]
[TR]
[TD]…[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]…[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Original Input data is col. D

copy & trim characters up to, and including, 'colon' from col. D to col. F

delete 'colon' from col. B

[I want a net of three columns with original INPUT data in 1st column and the data trimmed and parsed to second and third column as shown. Row length will vary to infinity.]

I would also like better wording for this question. This will help me think and speak syntax, aka "vbaeeze".

Thank you in advance.
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
Give this macro a try...
Code:
Sub GetPrefixSuffix()
  Range("A2", Cells(Rows.Count, "A").End(xlUp)).TextToColumns Range("B2"), xlDelimited, , , , , , , True, ":"
End Sub
 
Upvote 0

Forum statistics

Threads
1,224,817
Messages
6,181,144
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top