Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Crafty
 
Posts: n/a
Default Turning a row into a column? While importing?


I have a big one-line quoted list:

"value1";"value2";...;"value500"

Importing this into Excel causes it to be cut off at the 256th value as
it imports it as one row, with each value in a new column.

How can I make Excel import it with each value inserted into a new row
instead of a new column?


--
Crafty
  #2   Report Post  
Dave Peterson
 
Posts: n/a
Default

What version of excel are you using?

This will work in xl2k and higher (Split & Replace were added in xl2k):

Option Explicit
Sub testme()

Dim myStr As String
Dim mySplit As Variant

myStr = Range("a1").Value
myStr = Replace(myStr, Chr(34), "")
mySplit = Split(myStr, ";")

Range("a2").Resize(UBound(mySplit) - LBound(mySplit) + 1).Value _
= Application.Transpose(mySplit)

End Sub

I removed the quotation marks, too. Not sure if you want that.

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Crafty wrote:

I have a big one-line quoted list:

"value1";"value2";...;"value500"

Importing this into Excel causes it to be cut off at the 256th value as
it imports it as one row, with each value in a new column.

How can I make Excel import it with each value inserted into a new row
instead of a new column?

--
Crafty


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Importing csv file all data is in first column SteinS, Oslo Excel Worksheet Functions 0 September 26th 05 03:10 PM
Count Position of Filtered TEXT cells in a column Sam via OfficeKB.com Excel Worksheet Functions 8 May 18th 05 04:23 AM
How to group similar column titles together???? vrk1 Excel Discussion (Misc queries) 2 April 30th 05 12:17 AM
Return Count for LAST NonBlank Cell in each Row Sam via OfficeKB.com Excel Worksheet Functions 12 April 17th 05 10:36 PM
Formula for a column comicfly Excel Discussion (Misc queries) 2 March 11th 05 12:16 PM


All times are GMT +1. The time now is 01:50 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"