Referencing the name of a worksheet in a cell

  • Thread starter Thread starter bob
  • Start date Start date
B

bob

hello excel gurus...

I would like to have a string of text that incorporates
the name of on the worksheet tab. I have a series of
worksheet that are all very similar, it is just one word
in the title that changes and that is what I will be
naming the worksheet. Is there a way that I can have that
cell reference the tab name, so that I only have to name
it once and not twice.
Thanks!
-Bob
 
Bob,

Not sure if you want to get the cell from the tab name, or set the tab name
from the cell value.

So, if the former

=MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,255)

If the latter, you need VBA code, such as

Sub SetSheetName()
With ActiveSheet
.Name = .Range("A1").Value
End With
End Sub

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top