sheet name

tpkelley_no

Board Regular
Joined
Oct 14, 2011
Messages
188
Office Version
  1. 2010
Platform
  1. Windows
I have multiple excel sheet I need to name. the sheets will have a name already for example: order, cost labor. the name i would like to add will be on a sheet called proposal and the cell will be located in cell "B3" so the sheets need to have cost - "cell information from B3"
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Is this what you want...
Code:
[table="width: 500"]
[tr]
	[td]Sub ChangeSheetNamesAccordingToCellB3()
  Dim WS As Worksheet
  For Each WS In Worksheets
    If Len(WS.Range("B3")) Then WS.Name = WS.Name & " - " & WS.Range("B3")
  Next
End Sub[/td]
[/tr]
[/table]
 
Upvote 0
I only need this to work on the following work sheet tab named : orders, and the copy location for that sheet will be cell "C2", Cost cell location "B2" Labor: cell location "C2" Sorry about that
 
Upvote 0
I only need this to work on the following work sheet tab named : orders, and the copy location for that sheet will be cell "C2", Cost cell location "B2" Labor: cell location "C2" Sorry about that
I am sorry, but I am not at all clear on what you want to do. Can you provide a more detailed description of your current layout and what you want it to look like afterwards?
 
Last edited:
Upvote 0
Sorry about that.Sorry about that. the source sheet is called Cost Sheet and the location of the cell is "C2". the contents of that cell needs to be added to the following sheets: Orders, Costs, Labor. Example: if Cost Sheet has "BBK" in Cell "C2" the following sheet need to have Order - BBK, Cost - BBK, Labor - BBK.
the source sheet is called Cost Sheet and the location of the cell is "C2". the contents of that cell needs to be added to the following sheets: Orders, Costs, Labor. Example: if Cost Sheet has "BBK" in Cell "C2" the following sheet need to have Order - BBK, Cost - BBK, Labor - BBK.
 
Upvote 0
Example: if Cost Sheet has "BBK" in Cell "C2" the following sheet need to have Order - BBK, Cost - BBK, Labor - BBK.
What exactly do you mean by "the following sheets need to have"... need to have what?

Are you changing the sheet names to what you show?

Or are those value being placed on those sheets somewhere? If yes, where (what cells)?
 
Last edited:
Upvote 0
the work book does have multiple sheets and i only need the following sheets names to be change. Cell C2 on "Cost" tab has BWW. I need the following sheets to have BBW added. the sheets are named Orders, Cost, and Labor. after the code is ran it should have Orders-BWW, Cost- BWW, Labor - BWW. i can not get a screen shot to past.
 
Upvote 0
the work book does have multiple sheets and i only need the following sheets names to be change. Cell C2 on "Cost" tab has BWW. I need the following sheets to have BBW added. the sheets are named Orders, Cost, and Labor. after the code is ran it should have Orders-BWW, Cost- BWW, Labor - BWW. i can not get a screen shot to past.
Okay, so we are changing the sheet names themselves... that means we must use VB code to do it. Here is a macro that will do what I think you have described above...
Code:
Sub ChangeSheetNamesAccordingToCellB3()
  Dim V As Variant
  For Each V In Array("Orders", "Labor", "Cost")
    Sheets(V).Name = Sheets(V).Name & "-" & Sheets("Cost").Range("C2").Value
  Next
End Sub
 
Upvote 0

Forum statistics

Threads
1,213,532
Messages
6,114,176
Members
448,554
Latest member
Gleisner2

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