+ Reply to Thread
Results 1 to 5 of 5

Duplicate, rename, and output image files to folder based on criteria in Excel Column

  1. #1
    Registered User
    Join Date
    03-07-2015
    Location
    New York
    MS-Off Ver
    O365
    Posts
    56

    Duplicate, rename, and output image files to folder based on criteria in Excel Column

    I have a list of part #'s stored in MS Excel, with each part number containing a hyperlink to its corresponding image file. However, there is an issue where multiple part numbers are linked to the same image file. My objective is to ensure that each image file is duplicated as needed and given a new name that matches the corresponding part number. Essentially, I require the duplication and renaming of the same image file multiple times based on part number in column A.

    To address this challenge, I have utilized VBA to rename files within their respective folders. However, this approach only resolves half of the problem. In addition to renaming the files, I also need them to be duplicated and renamed based on the part numbers listed in the corresponding columns. (see attached screenshot). I am open to any ideas (VBA, scripting, tools, etc).

    Duplicate Image Example (1).xlsx
    Attached Files Attached Files
    Last edited by S Thibault; 05-10-2023 at 03:12 PM. Reason: Updated File

  2. #2
    Forum Contributor
    Join Date
    05-09-2021
    Location
    Sweden
    MS-Off Ver
    Office 365
    Posts
    148

    Re: Duplicate, rename, and output image files to folder based on criteria in Excel Column

    Have you tried something like this?

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    03-07-2015
    Location
    New York
    MS-Off Ver
    O365
    Posts
    56

    Re: Duplicate, rename, and output image files to folder based on criteria in Excel Column

    I am not sure how to use that. I received an error when I tried to run the module.

  4. #4
    Forum Contributor
    Join Date
    05-09-2021
    Location
    Sweden
    MS-Off Ver
    Office 365
    Posts
    148

    Re: Duplicate, rename, and output image files to folder based on criteria in Excel Column

    The code can be placed in a module but the sheet with the data needs to be active when running the code. What error do you get?

  5. #5
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Arrow Re: Duplicate, rename, and output image files to folder based on criteria in Excel Column


    Hi MrChulo !

    So as working directly on the active worksheet you can remove from your code the useless object variables
    (you forgot to set them to Nothing before the end) …
    Last edited by Marc L; 05-11-2023 at 09:51 AM.

+ 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. Replies: 10
    Last Post: 03-09-2023, 06:55 AM
  2. [SOLVED] Copy Folder then rename files in new folder from list in Excel
    By jimjones1958 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-20-2021, 05:00 PM
  3. Excel vba to rename .jpg files in a folder
    By BORUCH in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-16-2020, 02:30 AM
  4. Replies: 18
    Last Post: 11-27-2018, 05:25 AM
  5. Replies: 0
    Last Post: 03-04-2013, 02:37 PM
  6. Rename Excel Files in A folder
    By pradeepjassal in forum Excel General
    Replies: 1
    Last Post: 09-11-2012, 03:23 PM
  7. rename all the files in a folder based the names given in column A
    By aravindhan_31 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-19-2008, 05:30 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