B Bob Berglund Sep 7, 2003 #1 How can I get a sheet's Tab Name into a Cell? Thanks for your help. Bob
C Chip Pearson Sep 7, 2003 #2 Bob, In a formula, use =MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,32) As a VBA Function, use Function SheetName() As String SheetName = Application.Caller.Parent.Name End Function
Bob, In a formula, use =MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,32) As a VBA Function, use Function SheetName() As String SheetName = Application.Caller.Parent.Name End Function
G Gord Dibben Sep 7, 2003 #3 Bob With a macro..... Sub NameInCell() ActiveCell.Value = ActiveSheet.Name ''Range("A1").Value = ActiveSheet.Name End Sub With a formula........... =MID(CELL("filename",A1), FIND("]", CELL("filename",A1))+1, 255) Note: if using formula, workbook must be saved at least once before getting results. Gord Dibben Excel MVP XL2002
Bob With a macro..... Sub NameInCell() ActiveCell.Value = ActiveSheet.Name ''Range("A1").Value = ActiveSheet.Name End Sub With a formula........... =MID(CELL("filename",A1), FIND("]", CELL("filename",A1))+1, 255) Note: if using formula, workbook must be saved at least once before getting results. Gord Dibben Excel MVP XL2002
T Tom Ogilvy Sep 7, 2003 #4 See Chip Pearson's page: http://www.cpearson.com/excel/excelF.htm go to the bottom of the page.