Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Extracting Sheet Name
I'd like to create a worksheet function that will take as input a cell
reference or range, and will return the name of the worksheet that the input cell/range is on. For example, I would like to be able to enter a function with this general name/form: =Sheetname('Sheet1'!A1) and get the following text: Sheet1 Thanks for any help! Nick |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Extracting Sheet Name
Nick,
You can use a VBA function like the following: Function GetSheetName(R As Range) As String GetSheetName = R.Worksheet.Name End Function Then, call it from a worksheet cell with =GetSheetName(Sheet3!A1) -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Nick H" wrote in message ... I'd like to create a worksheet function that will take as input a cell reference or range, and will return the name of the worksheet that the input cell/range is on. For example, I would like to be able to enter a function with this general name/form: =Sheetname('Sheet1'!A1) and get the following text: Sheet1 Thanks for any help! Nick |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Extracting Specific Data from one sheet to another. | Excel Worksheet Functions | |||
Extracting data from one sheet into another | Excel Worksheet Functions | |||
Please help. Extracting data from one sheet to another | New Users to Excel | |||
Extracting information from records to another sheet automatically | Excel Worksheet Functions | |||
help extracting data from an excel sheet | Excel Worksheet Functions |