Cell reference to a worksheet.

gibbsak

New Member
Joined
Nov 24, 2009
Messages
12
Is there a formula to link a cell to return the label of a particular worksheet?

I have several worksheets and each has a title. I would like the titles to be filled automatically based on the worksheet name found in the tabs at the bottom.

Thanks
 

Some videos you may like

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.

VoG

Legend
Joined
Jun 19, 2002
Messages
63,650
Try

<code>=RIGHT(CELL("filename",A1),LEN(CELL("filename",A1))-FIND("]",CELL("filename",A1)))

the file must be saved for this to work.
</code>
 

Darren Bartrup

Well-known Member
Joined
Mar 13, 2006
Messages
1,296
Office Version
  1. 365
Platform
  1. Windows
Something like:

Code:
=RIGHT(CELL("filename",Sheet5!$N$1),LEN(CELL("filename",Sheet5!$N$1))-FIND("]",CELL("filename",Sheet5!$N$1)))

The function CELL returns specific information about the referenced cell.

The argument "filename" returns the full path, including the sheet name of a referenced cell within a saved workbook.

The key here is that the workbook name is enclosed in square brackets [ ], and anything that appears after the closing bracket is the sheet name, so the formula finds the closing bracket (]) and returns anything to the right of it.
 

snb_

Well-known Member
Joined
Nov 9, 2009
Messages
567
UDF:

Code:
Function sheetname()
    sheetname = ActiveSheet.Name
End Function
in B5:
=sheetname()

or

=Mid(CELL("filename");FIND("]";CELL("filename"))+1;200)
 

Watch MrExcel Video

Forum statistics

Threads
1,127,554
Messages
5,625,474
Members
416,109
Latest member
TripleA00123

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
Top