+ Reply to Thread
Results 1 to 3 of 3

Update text import values in multiple worksheets

Hybrid View

NJ_Dev Update text import values in... 05-28-2009, 10:23 PM
Justin Young Re: Update text import values... 05-30-2009, 09:51 AM
NJ_Dev Re: Update text import values... 05-30-2009, 11:22 AM
  1. #1
    Registered User
    Join Date
    05-28-2009
    Location
    usa
    MS-Off Ver
    Excel 2002
    Posts
    18

    Update text import values in multiple worksheets

    I have a workbook with 100+ worksheets. Each worksheet needs to contain imported text from a different file. Because of this, I have to manually edit each sheet to import the correct text file. I am going to be creating more workbooks of this size and will run into a similar issue then.

    Is there one location within the workbook where I can point to/specify the proper text import for each sheet rather than doing it the tedious way described above?

    Thanks in advance for any help on this...

  2. #2
    Registered User
    Join Date
    04-21-2009
    Location
    Melbourne,Australia
    MS-Off Ver
    Excel 2003,2007
    Posts
    34

    Re: Update text import values in multiple worksheets

    Please see the attached. The Params sheet contains a list of sample text files located on the C: drive. Note that these file names are contained in a named range dteFilesToImport and that the macro knows which files to import by looking in the named range. To add more filenames and expand the named range insert a row above the narrow row.

    Press ALT+F11 to display the Visual Basic Editor. mSystem module contains the macro you need. It runs through each cell and imports the file into a new sheet.

    Adjust the query table setting as need be - you can even these additional parameters in the params sheet.
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    05-28-2009
    Location
    usa
    MS-Off Ver
    Excel 2002
    Posts
    18

    Re: Update text import values in multiple worksheets

    thanks a lot! This is very close to what I need, although I'm having trouble modifying it to work with an existing workbook.

    For example, the existing workbook contains 100 worksheets (already named and populated with other data). I want to specify which text file gets imported to which existing worksheet.

    i.e., Worksheet-A Text file: Text-for-Worksheet-A

    Worksheet-B Text file: Text-for-Worksheet-B

    This is definitely on the right track, however, so I'll keep playing around with it. Thanks again...

+ 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