+ Reply to Thread
Results 1 to 4 of 4

Error when using 'text to columns' in macro

  1. #1
    Registered User
    Join Date
    06-22-2016
    Location
    Ireland
    MS-Off Ver
    2010
    Posts
    2

    Error when using 'text to columns' in macro

    Hi Guys,

    I am using excel 2010 and trying to basically compare 2 worksheets which have .txt files coped into them i.e I want to able to just paste .txt format into cell A1 of each worksheet and run my comparison macro. Unfortunately I am getting the errors below - VBA is saying that the section of code in bold is causing the issue. Any help would be greatly appreciated

    'runtime error '1004''



    no data was selected to parse.

    %code is as follows%

    Please Login or Register  to view this content.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,528

    Re: Error when using 'text to columns' in macro

    I think it's the fact that you select the sheet but you don't select the column. When you recorded the macro, you probably already had column A selected.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    06-22-2016
    Location
    Ireland
    MS-Off Ver
    2010
    Posts
    2

    Re: Error when using 'text to columns' in macro

    TMS - thank you for both the speed and content of your response. We have a fix

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,528

    Re: Error when using 'text to columns' in macro

    You're welcome.



    If you are satisfied with the solution(s) provided, please mark your thread as Solved.


    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save


    You may also want to consider thanking those people who helped you by clicking on the little star at the bottom left of their reply to your question.

+ 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. [SOLVED] error using text to columns
    By Quicksnot in forum Excel General
    Replies: 1
    Last Post: 10-07-2015, 02:51 PM
  2. Error in Text to columns loop due to parameter
    By icyrius in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 12-11-2013, 06:17 AM
  3. [SOLVED] Text To Columns Date Format Error
    By Simon.Ward in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-17-2013, 03:59 AM
  4. VBA Text To Columns Error
    By Steve0492 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-03-2013, 07:01 AM
  5. MAcro to - copy, transpose, text to columns, remove column A, combine all columns in 1
    By galvinpaddy in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 02-07-2013, 08:48 AM
  6. [SOLVED] "Run-time error '13': type mismatch when running macro to add text to end of text
    By nrjordan in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-18-2012, 10:34 PM
  7. text to columns date error when using Macro
    By AntDingle in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-02-2009, 11:01 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