+ Reply to Thread
Results 1 to 16 of 16

Macro for Text to Columns for All rows

  1. #1
    Registered User
    Join Date
    11-24-2012
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    8

    Macro for Text to Columns for All rows

    Hello,
    I'm very new to macros but am eager to learn!
    I'm trying to take the first column of this spreadsheet and operate the "text to column" function on every cell in Column A. I am able to record a simple macro, but can't get it to repeat on each row.
    (see attached)
    Any help would be much appreciated!
    Thanks,
    Miriam
    Attached Files Attached Files

  2. #2
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,517

    Re: Macro for Text to Columns for All rows

    Whats the delimiter?
    Thanks,
    Mike

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.

  3. #3
    Registered User
    Join Date
    11-24-2012
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Macro for Text to Columns for All rows

    It's a space.

  4. #4
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,517

    Re: Macro for Text to Columns for All rows

    Heres just a recorded macro

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    11-24-2012
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Macro for Text to Columns for All rows

    Thanks so much.
    When I go to use (click Tools>Macro>Run) it give me this error. (Attached). Any idea why?
    Thanks!
    Screen Shot 2012-11-24 at 10.49.43 AM.png

  6. #6
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,517

    Re: Macro for Text to Columns for All rows

    Give this a try

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    11-24-2012
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Macro for Text to Columns for All rows

    Hmm, Now I get the following 2 errors.
    Any idea why this would be happening? The process is simply Tools>Macro>Run, correct? Does it matter what cursor my mouse is in?
    Thanks again.
    -MiriamScreen Shot 2012-11-24 at 11.00.34 AM.pngScreen Shot 2012-11-24 at 11.00.27 AM.png

  8. #8
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,517

    Re: Macro for Text to Columns for All rows

    You uploaded a xlsx file witch is office 2007 or higher. Your Office ver in your Profile shows 2003. What version are you using? See if attached workbook works for you.


    split_data.xlsm

  9. #9
    Registered User
    Join Date
    11-24-2012
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Macro for Text to Columns for All rows

    I have excel 2010.
    I am able to open the attachment you sent, but again when i run the macro i get the same errors.

  10. #10
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,517

    Re: Macro for Text to Columns for All rows

    You on a PC or Mac?

  11. #11
    Registered User
    Join Date
    11-24-2012
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Macro for Text to Columns for All rows

    On a mac.
    Thanks.

  12. #12
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,517

    Re: Macro for Text to Columns for All rows

    I see, I dont have a Mac so Im guessing that Mac doesnt support Text to Columns. What is the code that you said you recorded maybe I can see the difference there.

  13. #13
    Registered User
    Join Date
    11-24-2012
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Macro for Text to Columns for All rows

    Here's what I ran
    Please Login or Register  to view this content.

  14. #14
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,517

    Re: Macro for Text to Columns for All rows

    I notice that you are using xlFixedWidth and not xlDelimited?

  15. #15
    Registered User
    Join Date
    11-24-2012
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Macro for Text to Columns for All rows

    I see. Would that make a difference?
    Do I need to just run the macro you sent or do i need to incorporate yours into this one?

  16. #16
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,517
    You cam try it but o don't think so. I'll be away from my computer till tomorrow.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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