+ Reply to Thread
Results 1 to 4 of 4

delete from text files

  1. #1
    Forum Contributor
    Join Date
    10-31-2013
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    221

    delete from text files

    Hi can someone help me with a vba macro please.

    I have a folder with text files I need to go through each text file and delete from the first row the comma and the words after the comma, only the first row. For example on row 1 it says

    Amazon 13th July 1471,sold 4

    so the macro would delete ",sold 4"

  2. #2
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,840

    Re: delete from text files

    Hello. Try this code
    Please Login or Register  to view this content.
    < ----- Please click the little star * next to add reputation if my post helps you
    Visit Forum : From Here

  3. #3
    Forum Contributor
    Join Date
    10-31-2013
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    221

    Re: delete from text files

    Hello YasserKhalil, that macro worked thank you for your help.

  4. #4
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,840

    Re: delete from text files

    You're welcome. Glad I can offer some help
    Regards

+ 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 VBA loop through files in folder and delete if contains certain text
    By merkalerkin in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-22-2017, 02:27 PM
  2. delete all text files from directory
    By cmccabe in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-19-2016, 05:02 PM
  3. [SOLVED] IMPORTING TEXT FILES TO EXCEL - Multiple Multi-line text files, each in a new column
    By wrenchfry in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-23-2014, 08:37 PM
  4. Import multiple text files delete rows between lines with File Name
    By coronakyk in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-10-2014, 09:53 PM
  5. Write text files, run another program, delete txt files upon alt-tab / exit..
    By niels007 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-05-2011, 10:05 AM
  6. Delete all files in directory, msgbox list files before delete.
    By randell.graybill in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-01-2010, 09:28 PM
  7. Disable AutoMacros in Word Doc and delete all text files
    By abousetta in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-27-2010, 03:03 AM

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