Renaming Multiple sheets from multiple workbooks based on cell value in table

EBITDA

New Member
Joined
Jul 11, 2017
Messages
2
Hi,

I am seeking for <acronym title="visual basic for applications" style="border-width: 0px 0px 1px; border-bottom-style: dotted; border-bottom-color: rgb(0, 0, 0); cursor: help; color: rgb(51, 51, 51); background-color: rgb(250, 250, 250);">VBA</acronym> code which will automatically rename the sheets name from multiple workbooks based on cell value in table.
I've example file in attachment. There're 4000 excel files with different lists' names titles. I generate name of workbooks and it's worksheets' names using macro but I have no idea how to recursively rename a bunch of workbooks' worksheets.

In column G - there're paths to files, column B containg names of lists according to files. Some files contain more than one lists.
Lists which names have to be renamed marked yellow. For example lists with name "false_sample_ad" have to be renamed to "true_sample". BUT. There are some lists titled "false_sample 2017" which should be "true_sample_2"

Any ideas? It's a great routine to open every incorrectly named file and rename it, thus, it has to be automated.

Thanks in advance.
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.

Forum statistics

Threads
1,215,537
Messages
6,125,386
Members
449,221
Latest member
DFCarter

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top