+ Reply to Thread
Results 1 to 6 of 6

.txt to Excel vba Macro

  1. #1
    Forum Contributor
    Join Date
    07-28-2018
    Location
    India
    MS-Off Ver
    2013
    Posts
    173

    .txt to Excel vba Macro

    Hi
    I have a .txt file which i have to import to excel & the data will be seperated by comma (,)
    .txt file name is NseVar.txt
    Hardcode the path & name of the file in the code only so that i will change it as per my needs

    & the file name where we have to import the .txt data is NseVar.xlsx & plz hardcode the path & name of the file also in the code only so that i will change it as per my needs
    Note :NseVar.xlsx is not opened so we have to open it & then we have to import the data from NseVar.txt


    Thnx for the Help
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    10-11-2021
    Location
    Netherlands
    MS-Off Ver
    365
    Posts
    1,381

    Re: .txt to Excel vba Macro

    How about

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    07-28-2018
    Location
    India
    MS-Off Ver
    2013
    Posts
    173

    Re: .txt to Excel vba Macro

    Please Login or Register  to view this content.


    I got the macro But there is a little change needed in this macro, Macro will be placed in Master.xlsm & the file where data should be imported is NseVar.xlsx so liitle change is needed
    So plz help in modifying the same in the code

  4. #4
    Forum Expert
    Join Date
    10-11-2021
    Location
    Netherlands
    MS-Off Ver
    365
    Posts
    1,381

    Re: .txt to Excel vba Macro

    The macro I posted, will create a file named NseVar.xlsx. Output is exactly the same as yours.
    Did you test it?

  5. #5
    Forum Contributor
    Join Date
    07-28-2018
    Location
    India
    MS-Off Ver
    2013
    Posts
    173

    Re: .txt to Excel vba Macro

    No Sir bcoz the code will be placed in master. Xlsm & data has to be imported to NseVar.xlsx, So ur code is not doing the way i am looking for

  6. #6
    Forum Expert
    Join Date
    10-11-2021
    Location
    Netherlands
    MS-Off Ver
    365
    Posts
    1,381

    Re: .txt to Excel vba Macro

    Ok how about this?

    Please Login or Register  to view this content.

+ 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. Excel macro to copy values from mutiple excel to single excel
    By pravkuma82 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-13-2017, 02:19 AM
  2. Replies: 1
    Last Post: 01-29-2015, 12:36 PM
  3. Excel Macro to copy Excel Invoice data to Excel Database - Works Perfect. But
    By asifmars in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-02-2014, 04:01 AM
  4. Requesting help in Excel Macro Tutorial/Basic Steps in creating a Macro in Excel
    By rhaiyan in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-19-2013, 09:21 PM
  5. Replies: 2
    Last Post: 11-26-2012, 08:33 AM
  6. Excel Macro (excel for mac 2010) - update multiple excel books on criteria
    By genichigo in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-15-2012, 07:23 AM
  7. Excel 2003 Macro --> Excel 2000 Macro
    By Tejas.T in forum Excel General
    Replies: 2
    Last Post: 10-21-2012, 07:57 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