+ Reply to Thread
Results 1 to 1 of 1

Help with importing csv files which partial filenames are cell values

  1. #1
    Registered User
    Join Date
    08-31-2010
    Location
    USA
    MS-Off Ver
    Excel 2013
    Posts
    3

    Help with importing csv files which partial filenames are cell values

    The GetData Macro listed below prompts the user to browse and select a csv file then imports the data of the selected csv file into a predetermined cell of the active worksheet. Then process repeats 3 more times to import data into the next predetermined cell in the same active worksheet.

    In cell A7 I have text "_300", cell G7 "_312", cell M7 "_400" and cell S7 "_420" (without the quotes). The text in these cells are partial filenames. I would like the Macro to only prompt the user to select a folder and then automatically use the text in the cells A7, G7, M7 & S7 to find the corresponding full filename within the user selected folder and import the data in to those cells. An example of the full filenames in a folder are: File_00_300.csv, File_00_312.csv, File_00_400.csv, File_00_420.csv. The File_## portion of the filename can change from folder to folder. How do I go about using the text in a cell to search a user specified folder for the full filename and use the corresponding text in that cell as the data import destination? Is this even possible? hope this makes sense.

    Thanks in advance for your help!
    Please Login or Register  to view this content.
    - WashCaps
    Last edited by WashCaps; 05-08-2015 at 08:53 PM.

+ 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. Quote Crazy!! Concatenating filenames and cell values
    By fitzt70 in forum Excel General
    Replies: 2
    Last Post: 07-19-2013, 10:10 PM
  2. [SOLVED] loop through files in a folder based on partial name from worksheet cell
    By Willardio in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-02-2013, 11:56 AM
  3. Linking files using cell contents as filenames...
    By tangcla in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 06-12-2008, 08:28 PM
  4. [SOLVED] Importing filenames into an excel worksheet
    By spider in forum Excel General
    Replies: 5
    Last Post: 06-14-2005, 03:05 PM
  5. Importing Filenames and Other File Data into Excel
    By martin_b in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-17-2005, 09:48 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