RENAME SHEET WITH CELL VALUE UNTIL BRACKETS

xenios

Board Regular
Joined
Sep 4, 2020
Messages
91
Office Version
  1. 2016
Platform
  1. Windows
Hi, hope somebody can help me.
Need to rename workbook sheets with cell value using macros, as it's about 300 sheets.
The problem is I have for example the name TEST1 (125) MY NAME, and need the sheet to be renamed only withe text before the 1st bracket.
Is there a way to do it with macros?
 
You need to copy the code for the function as well.
 
Upvote 0

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
that sub procedure is calling the function ExtractNthWord. You need to add that. Take a screenshot of what the error is showing when the function is inserted.

The error page attached. What do you mean by " to add that"?
 

Attachments

  • ERROR 1004.png
    ERROR 1004.png
    180.1 KB · Views: 4
Upvote 0
that sub procedure is calling the function ExtractNthWord. You need to add that. Take a screenshot of what the error is showing when the function is inserted.

"ExtractNthWord. You need to add that " what do you mean by that, do I need to add something extra?
The screenshot attached.
 

Attachments

  • ERROR 1004.png
    ERROR 1004.png
    180.1 KB · Views: 2
Upvote 0
That code is looking at the name of the sheet, not a cell value.
Can you answer my question in post#8
 
Upvote 0
Hi & welcome to MrExcel.
Which cells are the new names in & which cells are the current names in?
The name in the cell TEST1 (125) MY NAME
The name tha should have the sheet TEST1

Thank you
 
Upvote 0
That does not answer my question.
Please read post#8 & answer it.
 
Upvote 0
You will need to have a list of the current sheet names & a list of the "TEST1 (125) MY NAME" values so we know what sheet should be renamed.
Do you have a list like that & if so where is it?

All sheets have to be renamed, initailly they have names Sheet1, sheet2,..
I can have the list but, the thing is it won't always correspond to the range of the sheets.
After I will have to do the list from the initial big name of the sheet, or from the sheet name, didn't figure out exactly how it's gonna work.
 
Upvote 0
Where do you have the values like "TEST1 (125) MY NAME"?
Does it matter which sheet is renamed TEST1?
 
Upvote 0
You will need to have a list of the current sheet names & a list of the "TEST1 (125) MY NAME" values so we know what sheet should be renamed.
Do you have a list like that & if so where is it?

Sending you the picture how it should look like.
 

Attachments

  • THE LIST.png
    THE LIST.png
    163.3 KB · Views: 4
Upvote 0
But that sheet already has the correct name.
 
Upvote 0

Forum statistics

Threads
1,216,095
Messages
6,128,794
Members
449,468
Latest member
AGreen17

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