In this advanced excel tutorial, you'll learn to rename multiple files at once from a folder. You'll be able to change names with any file type like PDF, JPEG, Xlsx, etc.
If you are using a computer, you must've renamed files. Sometimes one, sometimes a few. It's still enjoyable at this point. But I've seen people struggling while changing multiple filenames. They aren't novices. They are skilled professionals like a financial analyst, a photographer, a writer, and many more. It's just the overwhelming number of files for them to retitle every now & then. Suppose you are a photographer and you need to change the name of a thousand images for better sorting purposes or a bunch of pdf files or even a couple of hundreds of excel files. It doesn't matter what type of files you have; it's the quantity that bothers you. How are you planning to do this? Command Prompt or bulk rename utility?
That's entirely possible, but the average pc user, mostly a Windows user, doesn't have the programming know-how. And batch rename utility isn't a thing everyone has, let alone the price and the limitations. So, these options are ruled out. What could be the most convenient solution? A solution that doesn't require programming skills or any new application that needs to be purchased or installed. Perhaps an application that every windows computer already has.
I've just the solution for you. I'll use Microsoft Excel for that. Yes, you read it right. Even excel can handle these types of tasks if you know how to do it. No programming skills or application needed. But this is a bit advanced tutorial. Hold on. I just said no programming skills required; at the same time, I said it's an advanced excel tutorial. That doesn't make sense.
Well, if you are willing to create this type of productive tool to change multiple filenames using excel by yourself, you'll have to be a pro excel user, that's for sure. But if you follow the instructions I'm about to share, step by step, you can do it even if it's your first day on excel, and that's a promise. That's why I said you don't need any programming knowledge, not a bit. If you know how to follow instructions, copy paste a few things, you are good to go. And I'm damn sure you know that unless you wouldn't be here.
I'll create a rename shortcut to change the name of multiple files at once in excel using Visual Basic for Application (VBA). After today you'll be renaming multiple files on windows pc within a blink of an eye. It doesn't matter if you need to change all filenames inside a folder or files with different file types or Extensions. We can handle everything.
So, let's follow the instructions below and change some names using excel on a windows machine.
1. Open Microsoft Excel on your windows computer.
2. Write or Extract Filenames with Extension in column A. One name in each row.
3. Write the new name on the corresponding cell in Column B.
4. Click on the Developer tab from the Ribbon.
5. Click on Visual Basic
6. Click on Insert
7. Click on Module
8. Paste/write the code.
9. Click on the Triangle "Run" Button from the VBE or Press F5
10. Select the folder where you have the files.
Done. There are a few things you need to consider for this to work.
1. Please list the names along with the file extension. Learn how to import file name and Extension in excel.
2. You need to transfer all the files to a single folder before running the code.
Few things you'll be able to solve from now on.
1. Rename files from the excel list
2. Retitle all files from a folder
3. Rename multiple files with different names & file formats like PDF, JPG, PNG, XLSX, XLSM, etc.
4. Retitle multiple files using excel in windows
Now let's understand the VBA code we just used.
First of all, I started the code with the macro name. "RenameFiles" is our macro name, and we've written it like this:
Sub RenameFiles()
Then we declare the different variables used in this code by the Dim keyword, which is the short form of dimension.
After that, I wrote the code to open the file explorer, and we could select the folder from where excel will change filenames. Now comes the condition. If the folder isn't empty, the code will match the file names with the names listed in Column A. That means if the file name from the folder and file name from Cell A1 matches, excel VBA will name the file from that folder with the new name listed in Cell B2. In short, this is an advanced excel tutorial that changes filenames from the excel list.
After that, we close the function and the Macro as well. If you need to retitle files in different directories, you need to move them to a single directory. Once you are done, you can move them back to the original file directory. This code only changes names from a single folder or directory at a time.
The trickiest part of this tutorial is to copy file names from folder to excel. To change the filenames, first, you need to list the original filenames in Column A. Not only that but also we need to list the names with Extension, like Book.Pdf. Now there are numerous ways to do it, and I've already covered the entire procedure. You can check Both VBA and Non-VBA versions If you Like.
In this advanced excel tutorial, you’ll learn to extract multiple filenames from a folder to an excel worksheet. You’ll be able to extract filenames, file paths, and file extensions.......
In this Intermediate excel tutorial you'll learn to import important file details using Power query. This will be a dynamic Data table and you don't need any VBA to do this.......