![]() |
referencing the name of a worksheet
How can I refer to the 'name' of a worksheet in a cell.
So that if I change the name of the worksheet, the new name will be reflected in that cell. (like worksheet1.name, reference the 'name attribute' of a worksheet). Thanks in advance, Simon |
referencing the name of a worksheet
try
=MID(CELL("filename",Sheet2!A1),FIND("]",CELL("filename",Sheet2!A1))+1,255) which returns "Sheet2" "Simon P California" wrote: How can I refer to the 'name' of a worksheet in a cell. So that if I change the name of the worksheet, the new name will be reflected in that cell. (like worksheet1.name, reference the 'name attribute' of a worksheet). Thanks in advance, Simon |
referencing the name of a worksheet
I am trying to do the same thing. So say in cell A1 of worksheet "Fibre" I
want cell A1 to return the tab or worksheet name "Fibre" If I change the tab name I want cell A1 to change to whatever I call the tab. I am not understanding your formula. Would you be able to explain it to me differently. Thanks "JMB" wrote: try =MID(CELL("filename",Sheet2!A1),FIND("]",CELL("filename",Sheet2!A1))+1,255) which returns "Sheet2" "Simon P California" wrote: How can I refer to the 'name' of a worksheet in a cell. So that if I change the name of the worksheet, the new name will be reflected in that cell. (like worksheet1.name, reference the 'name attribute' of a worksheet). Thanks in advance, Simon |
referencing the name of a worksheet
=MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,255)
Entered in any cell of a sheet. Gord Dibben MS Excel MVP On Tue, 28 Aug 2007 14:36:04 -0700, reference cell to tab/worksheet name <reference cell to tab/worksheet wrote: I am trying to do the same thing. So say in cell A1 of worksheet "Fibre" I want cell A1 to return the tab or worksheet name "Fibre" If I change the tab name I want cell A1 to change to whatever I call the tab. I am not understanding your formula. Would you be able to explain it to me differently. Thanks "JMB" wrote: try =MID(CELL("filename",Sheet2!A1),FIND("]",CELL("filename",Sheet2!A1))+1,255) which returns "Sheet2" "Simon P California" wrote: How can I refer to the 'name' of a worksheet in a cell. So that if I change the name of the worksheet, the new name will be reflected in that cell. (like worksheet1.name, reference the 'name attribute' of a worksheet). Thanks in advance, Simon |
referencing the name of a worksheet
Are you sure you used that exact formula?
I'm guessing that you changed it--maybe dropped the A1 references. Add them back and try it. If that doesn't help, post your exact formula. Stuart wrote: Guys, I'm using excel 2003 SP3. When I use the above formula on multiple worksheets I get a wierd bug. On sheet 1 it will report "Sheet1" and on Sheet 2 it will give "sheet2" So if I edit the formula or paste the formula on sheet 2 it will return "sheet 2" but when I go back to sheet 1 it will be saying "sheet2"! Help! "Gord Dibben" wrote: =MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,255) Entered in any cell of a sheet. Gord Dibben MS Excel MVP On Tue, 28 Aug 2007 14:36:04 -0700, reference cell to tab/worksheet name <reference cell to tab/worksheet wrote: I am trying to do the same thing. So say in cell A1 of worksheet "Fibre" I want cell A1 to return the tab or worksheet name "Fibre" If I change the tab name I want cell A1 to change to whatever I call the tab. I am not understanding your formula. Would you be able to explain it to me differently. Thanks "JMB" wrote: try =MID(CELL("filename",Sheet2!A1),FIND("]",CELL("filename",Sheet2!A1))+1,255) which returns "Sheet2" "Simon P California" wrote: How can I refer to the 'name' of a worksheet in a cell. So that if I change the name of the worksheet, the new name will be reflected in that cell. (like worksheet1.name, reference the 'name attribute' of a worksheet). Thanks in advance, Simon -- Dave Peterson |
All times are GMT +1. The time now is 04:21 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com