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
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
Try

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

the file must be saved for this to work.
</code>
 
Upvote 0
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.
 
Upvote 0
UDF:

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

or

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

Forum statistics

Threads
1,214,925
Messages
6,122,301
Members
449,078
Latest member
nonnakkong

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