Please Help

Bassai

New Member
Joined
Sep 3, 2012
Messages
9
Hi

I need to move data from 5 rows in one column and to separate columns. The data looks like this

[TABLE="width: 565"]
<colgroup><col><col><col></colgroup><tbody>[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Infinity Auto Import[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]20 Puriri Street, New Lynn, Auckland[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]09 9512882[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]View dealer listings[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]IV Cars[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]90 Portage Road, Otahuhu, Auckland[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]09 9512843[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]But needs to be sorted like this:[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Column A[/TD]
[TD]Column B[/TD]
[TD]Column C[/TD]
[/TR]
[TR]
[TD]Infinity Auto Import[/TD]
[TD]20 Puriri Street, New Lynn, Auckland[/TD]
[TD]09 9512882[/TD]
[/TR]
[TR]
[TD]IV Cars[/TD]
[TD]90 Portage Road, Otahuhu, Auckland[/TD]
[TD]09 9512843[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]I would appreciate your help[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 

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.
adjust as needed...

Rich (BB code):
Sub ParseFile()
Dim vFile, vLine
Dim i As Integer
Const Q = """"
vFile = "C:\temp\textfile.txt"
Range("a2").Select
i = 1
Open vFile For Input As #1 
While Not EOF(1)
  Line Input #1 , vLine
  vLine = Trim(vLine)
  
  If InStr(vLine, "View dealer listings") > 0 Then vLine = ""
  
    If vLine <> "" Then
        ActiveCell.Offset(0, i - 1).Value = vLine
        
        i = i + 1
        If i = 4 Then
          i = 1
          ActiveCell.Offset(1, 0).Select  'next row
        End If
    End If
Wend
Close 1
End Sub
 
Upvote 0

Forum statistics

Threads
1,223,901
Messages
6,175,277
Members
452,629
Latest member
SahilPolekar

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