+ Reply to Thread
Results 1 to 3 of 3

Building Multiple .txt Files From An Original .txt File With Specified Find and Replace

  1. #1
    Registered User
    Join Date
    08-27-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    7

    Building Multiple .txt Files From An Original .txt File With Specified Find and Replace

    Let me start by explaining the process of what I am trying to do

    I have an original text file and I am trying to build many (about 650) text files with a few minor changes to each one
    The changes include renaming each file with a specified file name and replacing some of the words/data in text file

    In the uploaded workbook I have laid out two tables on sheet1 and sheet2 that help illustrate what I am trying to do
    I have also uploaded the base .txt file that I am using.
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor MaczaQ's Avatar
    Join Date
    06-03-2011
    Location
    Poland
    MS-Off Ver
    Excel 2003 / XP
    Posts
    510

    Re: Building Multiple .txt Files From An Original .txt File With Specified Find and Replac

    Hi,

    lack of explanation.

    Source data from column H (3) appears very often in txt file (like '3', '3060', '315' etc.)
    Best Regards
    MaczaQ
    ---------------------------------------------------------------------------------------------------------------------------
    If you are satisfied with the solution(s) provided, please mark your thread as Solved
    If you are pleased with my answer consider to rate it. To thank someone who has helped you, click on the star icon below their name.
    - This way you will add him some reputation points ... thanks in advance.

  3. #3
    Registered User
    Join Date
    08-27-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Building Multiple .txt Files From An Original .txt File With Specified Find and Replac

    I am aware of how often the data in H appears, I meant for the uploaded chart just to be a sample of what it could replace. The exact replacements that I want to be making will be much more specific e.g. BV1212, CL1212, FC1212.

    Let me better explain how I am trying to make this work, Take sheet 2 for example, The original/base file name is located in B4, B5-B12 are a list of what i would like the new file names to be. F4, G4, H4... are the words I would like it to search in the file. When the code finds an instance, lets say, F4 which is "AG_TIME", it will replace "AG_TIME" with "AG_TEMP" and save the file as td5002.txt

    I'm sorry this isn't terribly concise I'm quite new to the excel and vba game

+ 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