VBA to rename folders in bulk

gusbus

New Member
Joined
Mar 31, 2022
Messages
9
Office Version
  1. 2021
Platform
  1. Windows
Hi I am trying to rename folders using VBA. The goal would be to do a batch update to rename existing folders with a standard naming convention.

Ideally I would have the file path listed in one column in my spreadsheet (I already have a list) and then have the updated file path listed the corresponding row in another column.

Thanks in advance.
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Something like this

VBA Code:
Sub jec()
 Dim it As Variant
 For Each it In Range("A2", Range("A" & Rows.Count).End(xlUp))
   Name it As it.Offset(, 1)
 Next
End Sub
 
Upvote 0
Solution
Thanks! Simple and effective. I was not sure it worked at first but added a message box to avoid that confusion. I see that the list starts in the second row which is convient.
 
Upvote 0

Forum statistics

Threads
1,224,621
Messages
6,179,938
Members
452,949
Latest member
beartooth91

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