Batch cell names renaming

hyperipod

New Member
Joined
Jul 7, 2010
Messages
6
I'm currently merging similar Excel workbooks in one file.
And they use the same cell names.
And i will need to reuse those values in another worksheet later.
SO I need to rename a lot of cells and it would be really long doing it with the name manager, is there a faster way to do it?
Also, i just need to add 3 letters in front of the cell names.
And I have Excel 2007.

Maybe a macro would do the job?
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
You could try something like this (change "USA_" to your 3 letters).

Code:
Dim n As Name
    For Each n In ThisWorkbook.Names
        n.Name = "USA_" & n.Name
    Next n
 
Upvote 0
You could try something like this (change "USA_" to your 3 letters).

Code:
Dim n As Name
    For Each n In ThisWorkbook.Names
        n.Name = "USA_" & n.Name
    Next n

:LOL:HAHAHA!:ROFLMAO:
I just spent the last 30 minutes renaming! My brain, hands and fingers are dead!

I'll try this for the next sheet! Thanks!

Oh! can the macro search for names in a single sheet instead of the whole workbook?
Code:
Dim n As Name
    For Each n In [B][I][U]ThisWorksheet.Names[/U][/I][/B]
        n.Name = "USA_" & n.Name
    Next n

Is this possible?:confused:
 
Upvote 0

Forum statistics

Threads
1,213,527
Messages
6,114,140
Members
448,551
Latest member
Sienna de Souza

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