Importing multiple lines into Excel from txt.

E

EricB

Importing multiple lines into Excel from txt. or MSWord

I have data comprising of some 325.000 rows, naturally .csv on allows a
little over 65.000.
How can I imports or paste data from txt. or Word into EXCEL that the
program creates more than one page to accept all the data.

The macro on http://redirx.com/?33qf gave me an “out of memory’ result.

Regards

EricB
 
E

EricB

MACRO is working now, but I need to edit each page by:
Selecting Column A
Using tools:
Can I imput this function into the MACRO and how? I'm not great at working
Macros.

EricB
 
G

Gord Dibben

If using Chip's code the data is split by comma-delimited within the code.

See.........................SplitChar = ","

If using Bernie's code from the URL you posted, you will have to add a Text
to Columns routine to it.

Record a macro whilst runing through Text to Columns and add it to the code
or just run on each sheet after import.

To run on all sheets after import...............

Sub splitem()
Application.ScreenUpdating = False
Dim ws As Worksheet
Set wkbktodo = ActiveWorkbook
For Each ws In wkbktodo.Worksheets
Columns("A:A").Select
Selection.TextToColumns Destination:=Range("A1"), _
DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, _
ConsecutiveDelimiter:=False, Tab:=False, _
Semicolon:=False, Comma:=True, _
Space:=False, Other:=False, FieldInfo:= _
Array(1, 1), TrailingMinusNumbers:=True
Next ws
Application.ScreenUpdating = True
End Sub


Gord Dibben MS Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top