Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Sheet Name Formula
Hello:
I would like to write a custom formula that will give the name of the sheet. The formula should work something like this: =SheetName(X), and X represents the sheet number in that worksheet. Please let me know. Thanks. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Sheet Name Formula
Hi,
How about a UDF. Alt +F11 to open VB editor. Right click 'This Workbook' and sert module and paste the code below in on the right. call with =Sheetname(n) wher n is the sheet number. I've included 2 options the sheet name as appears on the Tab or the sheet codename. Use which one you want. Function sheetname(cdname As Integer) sheetname = Sheets(cdname).CodeName 'sheetname = Sheets(cdname).Name End Function Mike "art" wrote: Hello: I would like to write a custom formula that will give the name of the sheet. The formula should work something like this: =SheetName(X), and X represents the sheet number in that worksheet. Please let me know. Thanks. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Sheet Name Formula
Thanks, this is exactly what I needed. It's much easier to use then using the
Filename.... Formula. "Mike H" wrote: Hi, How about a UDF. Alt +F11 to open VB editor. Right click 'This Workbook' and sert module and paste the code below in on the right. call with =Sheetname(n) wher n is the sheet number. I've included 2 options the sheet name as appears on the Tab or the sheet codename. Use which one you want. Function sheetname(cdname As Integer) sheetname = Sheets(cdname).CodeName 'sheetname = Sheets(cdname).Name End Function Mike "art" wrote: Hello: I would like to write a custom formula that will give the name of the sheet. The formula should work something like this: =SheetName(X), and X represents the sheet number in that worksheet. Please let me know. Thanks. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Formula to copy related information from sheet 1 to sheet 2 | Excel Worksheet Functions | |||
Can I annotate a formula result in Sheet 1 in Sheet 2 by Cell Addr | Excel Worksheet Functions | |||
create a formula in one sheet that would read data from separate sheet automatically | Excel Discussion (Misc queries) | |||
how to copy a cell with formula from sheet 1 (data is all vertical) into sheet 2 | Excel Worksheet Functions | |||
Lookup cell contents in on sheet based on a formula in second sheet | Excel Worksheet Functions |