English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

What do I do if I want a cell to contain the name of its tab. So, initially the cell would says "sheet1". as I change the name of the tab, the cell would change as well. Please advise.

2006-06-18 10:40:49 · 7 answers · asked by Anonymous in Computers & Internet Software

I mean what formula would I use to have a cell reference to the name of its tab.

2006-06-18 10:46:20 · update #1

7 answers

Goto Tools Menu > Macro > Visual Basic Editor (Alt + F11)

Type this in exactly...

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Sheet1.Cells(1, 1) = Sheet1.Name
End Sub

Sheet1.Cells(Row, Column)
Row = Row Number
Column = Column Number (A = 1, B = 2, C = 3, etc)

This will change the text in the cell everytime you change the name of the sheet and click anywhere in the sheet.

2006-06-19 09:08:42 · answer #1 · answered by Mr. Me 3 · 4 0

To the best of my knowledge ALL cells within the tabbed worksheet contain embedding references to the Tab name. If you're concerned about linking and want to be able to refer to the tab name without keeping track of which sheet (1,2,3, etc.) I suggest copy and paste link.

2006-06-18 10:46:17 · answer #2 · answered by Anonymous · 0 0

I use Microsoft Visual Basic to do that.

> Tools Menu > Macro > Visual Basic Editor (Alt + F11)
> I make this Sub :

Private Sub Worksheet_Change(ByVal Target As Range)
Range("A1").FormulaR1C1 = (Sheet1.Name)
End Sub

In this example, Range("A1") is a cell. Sheet1.name will return Sheet Name value!
I think ok! ^___^

2006-06-18 11:05:32 · answer #3 · answered by bucminhwa 3 · 0 0

You will have to create a Macro that will copy the name of the tab and then past it in the cell. Their is no easy way to do what you are asking.

2006-06-18 10:49:34 · answer #4 · answered by Mojo Jojo 3 · 0 0

In Excel it truly is available to apply the cellular function/formulation and the MID and locate to return the call of an Excel Worksheet in a Workbook. The formulation under shows us how; =MID(cellular("filename",A1), locate("]", cellular("filename",A1))+a million,256) the place A1 is any non errors cellular on the Worksheet. in case you like the finished direction of the Excel Workbook, basically use; =cellular("filename",A1) it truly is taken into consideration necessary observe that the above formulation will in user-friendly terms artwork in a Workbook that has been saved.

2016-10-31 02:29:51 · answer #5 · answered by mcthay 4 · 0 0

just rename your tab, it'll make the changes for you on the sheet

2006-06-18 10:42:24 · answer #6 · answered by Anonymous · 0 0

Yes.
It would make the change in the cell as well.

2006-06-18 10:43:47 · answer #7 · answered by Mintz 3 · 0 0

fedest.com, questions and answers