Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
How to create a 'name' which is not worksheet spcific
Hello,
I need to refer to a range of cells in a function. Same function is used in different worksheets of same workbook. The name when used in a specific page should refer to the cells from that page. ie., I have defined a name as myname =a1:d5 when used in sheet sheet1, myname should give = 'sheet1'!a1:d5 when used in sheet sheet2, myname should give = 'sheet2'!a1:d5 like that... Thanks |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
How to create a 'name' which is not worksheet spcific
Function BJ()
dim oRng as range Application.volatile set orng=application.caller.parent.range("A1:D5") ....... BJ= ... end function or if you want to use a name then Myname=INDIRECT("A1:D5) in both cases you would need to define the function as volatile because the range is not referenced in the argument list for the function so Excel does not know when to recalculate the function: in general you should try to avoid using Application.volatile -- Charles ______________________ Decision Models FastExcel 2.2 Beta now available www.DecisionModels.com "bj" wrote in message ... Hello, I need to refer to a range of cells in a function. Same function is used in different worksheets of same workbook. The name when used in a specific page should refer to the cells from that page. ie., I have defined a name as myname =a1:d5 when used in sheet sheet1, myname should give = 'sheet1'!a1:d5 when used in sheet sheet2, myname should give = 'sheet2'!a1:d5 like that... Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Can I create a worksheet menu to select each other worksheet | Excel Discussion (Misc queries) | |||
create a list base on another worksheet | Excel Discussion (Misc queries) | |||
How do I create an Excel worksheet with a limited no. of rows? | Excel Discussion (Misc queries) | |||
quickly create extra copies of a worksheet template in a workbook | Excel Worksheet Functions | |||
Create a "recap" worksheet that includes all info from all worksh. | Excel Worksheet Functions |