Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Referencing the worksheet name in an excel function
Does anyone mknow how I would reference "Sheet2" to a cell in a worksheet
Need to be able to change the worksheet name based on a cell Thanks ='C:\Documents and Settings\FP&A\Templates\[SMP2Data.xls]Sheet2'!$A$1 -- Helping Is always a good thing |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Referencing the worksheet name in an excel function
If you want to know the name of the sheet of a range passed as a parameter
use Rnge.Parent.Name If you want to know the name of the sheet that contain the call to the UDF use Application.Caller.Parent.Name If you want to know the contents of a cell that contains a sheet name use Rnge.Value Be careful that all references to cells are passed as parameters to your function so that Excel knows to recalculate your function whenever any of the cells change. Otherwise you will have to make your function Volatile, which is slow. regards Charles __________________________________________________ The Excel Calculation Site http://www.decisionmodels.com "QuietMan" wrote in message ... Does anyone mknow how I would reference "Sheet2" to a cell in a worksheet Need to be able to change the worksheet name based on a cell Thanks ='C:\Documents and Settings\FP&A\Templates\[SMP2Data.xls]Sheet2'!$A$1 -- Helping Is always a good thing |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel 2007 - referencing a cell value from another worksheet withi | Excel Discussion (Misc queries) | |||
excel, what if function referencing another cell | Excel Worksheet Functions | |||
Offset function referencing worksheet | Excel Discussion (Misc queries) | |||
Excel Function referencing another sheet | Excel Programming | |||
Selection method not available in VB when referencing Excel worksheet | Excel Programming |