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

Infinity Auto Import
20 Puriri Street, New Lynn, Auckland
09 9512882
View dealer listings
IV Cars
90 Portage Road, Otahuhu, Auckland
09 9512843
But needs to be sorted like this:
Column AColumn BColumn C
Infinity Auto Import20 Puriri Street, New Lynn, Auckland09 9512882
IV Cars90 Portage Road, Otahuhu, Auckland09 9512843
I would appreciate your help

<colgroup><col><col><col></colgroup><tbody>
</tbody>
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
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,214,589
Messages
6,120,415
Members
448,960
Latest member
AKSMITH

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