+ Reply to Thread
Results 1 to 6 of 6

CSV Import, Macro currently overwriting columns

  1. #1
    Registered User
    Join Date
    08-14-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2007
    Posts
    4

    CSV Import, Macro currently overwriting columns

    Hi,

    I am attempting to import multiple .cor files into one workbook on separate sheets.
    I have found got a macro which does this (see below) however I want to change it so that the macro separates both ":" and "tab" delimiters.
    When I do this the data columns (starting at row 103) overwrite each other and I end up with one column of data instead of 4, but the text at the top is separated correctly.
    I have uploaded my macro file and the data file (I cant upload .cor files so had to change it to an excel file.)

    I have been trawling through forums but haven't been able to find a solution.

    Thanks for your help

    James


    Please Login or Register  to view this content.
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    08-14-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: CSV Import, Macro currently overwriting columns

    I have now managed to figure out how to do it, I modified the code as below.




    Please Login or Register  to view this content.

  3. #3
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: CSV Import, Macro currently overwriting columns

    Hi,

    The Excel data file isn't much use since it has already been parsed starting at row 103.

    Can't you change the .cor name to a .csv and upload that.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  4. #4
    Registered User
    Join Date
    08-14-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: CSV Import, Macro currently overwriting columns

    Hi Richard,

    Thanks for your reply and interest in helping me, I have managed to solve this issue now.

    And changing the file to a .csv is an excellent idea I will do that next time.

    James

  5. #5
    Registered User
    Join Date
    08-14-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: CSV Import, Macro currently overwriting columns

    data file as CSV.
    Attached Files Attached Files

  6. #6
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: CSV Import, Macro currently overwriting columns

    Quote Originally Posted by eardyjim View Post
    Hi Richard,

    Thanks for your reply and interest in helping me, I have managed to solve this issue now.

    And changing the file to a .csv is an excellent idea I will do that next time.

    James
    Just checking since you followed this up with a new attachment. Is this in fact resolved or are you still looking for input?

+ 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 import data from specific columns form csv and rearrange
    By tonyrobbo in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-21-2013, 02:01 PM
  2. Compare Columns and Replace Values without overwriting
    By Girish Punjabi in forum Excel General
    Replies: 1
    Last Post: 03-14-2013, 12:43 PM
  3. Copying columns from multiple workbooks into one master woork without overwriting
    By nimsun in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-23-2013, 05:54 AM
  4. Macro to import a flat file using 'text to columns'
    By miniweld in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-04-2008, 04:37 AM
  5. Import Data Macro (not-overwriting certain columns)
    By MasterMonk in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-19-2007, 11:38 AM

Tags for this Thread

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