Importing text

  • Thread starter Thread starter mthnrd
  • Start date Start date
M

mthnrd

I am trying to import text into Excel, but I want to place one characte
per cell. I can do this throught "Text to Columns", then "Fixe
Width", but it is a very lengthy process.

Is there a shortcut or can you help me write a funtion to place
special character between each "real" character so that I can us
"Delimited" to place my characters in the cells?

Thanks in advance,

MthNr
 
Mthnrd

You will need code in any case, or a lengthy function. Why not record
yourself doing a text-to-columns and run that each time

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
(e-mail address removed)
 
I thought of doing it using your mehod, but it would require double
processing. Might as well use a macro to transfer characters from
column A to following columns in one go.

'------------------------------------------------
'- imported data in column A
Sub EXTRACT_CHARACTERS()
Dim MyString As String
Dim MyRow As Long
'----------------------
MyRow = 1
While ActiveSheet.Cells(MyRow, 1).Value <> ""
MyString = ActiveSheet.Cells(MyRow, 1).Value
For c = 1 To Len(MyString)
ActiveSheet.Cells(MyRow, c + 1).Value = _
Mid(MyString, c, 1)
Next
MyRow = MyRow + 1
Wend
End Sub
'--------------------------------------------------
 

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

Back
Top