+ Reply to Thread
Results 1 to 5 of 5

How to do texttoColumn delimited by space in column?

  1. #1
    Registered User
    Join Date
    05-25-2013
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    11

    Exclamation How to do texttoColumn delimited by space in column?

    Hi,

    Column A in worksheet1 contains multiple numbers or texts separated by space.
    I am trying to take all the data on column A (which were copied from someother text file) put them in to different cell vertically ( in column).
    I've tried to do text to column delimited by space and transpose it afterward.
    The problem is I get this warning sign when I try to do text to column delimited : "text extends beyond the worksheet. some text will be lost"


    Is there any way to write VBA that checks if first character on column A and row i (on sheet1) is either a number or asterisk (*), if so take that cell and do text to column delimited by space in vertical on Sheet2.


    Column A looks like :
    Row 1) H20
    Row 2) 1 2 3 4 5 6 7 8 9 10 11 2 3 3 5 6 6 7 8 9 0 0 7 ...
    Row 3) C02
    Row 4) 12 432 5 7 54 76 89 4532 987 43 8973 48 3 7834 983 49 3489 34 9 34 ...
    Row 5) Temperature
    Row 6) 123 231 23 23 31 34 4 45 56 67 75 78 68 689 68 76 35 243 413 ...

    and so on...


    Desired output: (On sheet2)
    Column A | Column B | Column C
    H20 | C02 | Temperature
    1 | 12 | 123
    2 | 432 | 231
    3 | 5 | 23
    4 | 7 | 23
    5 | 54 | 31
    . | . | .
    . | . | .
    . | . | .
    etc ...

    example attached:
    example.xls

    Please take a look at the example xls file.

    Any help would be appreciated.
    Thanks,
    Last edited by lee478; 12-15-2013 at 09:02 PM. Reason: example attached

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: How to do texttoColumn delimited by space in column?

    Can you upload an example workbook?

    Click on GO ADVANCED and use the paperclip icon to open the upload window.
    If posting code please use code tags, see here.

  3. #3
    Forum Expert
    Join Date
    02-22-2013
    Location
    London, UK
    MS-Off Ver
    Office 365
    Posts
    1,218

    Re: How to do texttoColumn delimited by space in column?

    Try this, with the data in Sheets(1) and the destination sheet as Sheets(2):

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    05-25-2013
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: How to do texttoColumn delimited by space in column?

    I am getting Compile error "Expected Array" on LBound

  5. #5
    Forum Expert
    Join Date
    02-22-2013
    Location
    London, UK
    MS-Off Ver
    Office 365
    Posts
    1,218

    Re: How to do texttoColumn delimited by space in column?

    For me, the attached sample workbook works.

    Try to upload your workbook excluding any sensitive data, if this doesn't work
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Macro to sum all space delimited content of a cell?
    By lexluthor in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-12-2010, 08:05 AM
  2. Space delimited text to multiple columns
    By mogdog1981 in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 06-09-2010, 08:55 AM
  3. How to change cell into space delimited for many cells
    By contextions in forum Excel General
    Replies: 1
    Last Post: 03-10-2009, 05:12 PM
  4. open txt files Delimited, Space
    By terrysd in forum Excel General
    Replies: 9
    Last Post: 09-10-2008, 04:49 PM
  5. space delimited!!
    By Jason in forum Excel General
    Replies: 2
    Last Post: 02-23-2006, 10:55 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1