View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Gord Dibben Gord Dibben is offline
external usenet poster
 
Posts: 22,906
Default Importing multiple lines into Excel from txt.

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

On Mon, 6 Oct 2008 05:26:05 -0700, EricB
wrote:

MACRO is working now, but I need to edit each page by:
Selecting Column A
Using tools:
Data
Text to Columns
Delimited
'clear' TABS & Select COMMA


Can I imput this function into the MACRO and how? I'm not great at working
Macros.

EricB

"EricB" wrote:

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