![]() |
Defining worksheet specific range names
I have the following in a macro
ActiveWorkbook.Names.Add Name:=rangename, RefersToR1C1:=seriesrange This works to define workbook names. Is it possible to define a worksheet specific name? I have the sheet name defined as "sht" and am wondering what I need to change if it can be done. Thanks in advance, Barb Reinhardt |
Defining worksheet specific range names
Barb,
I believe to specify a local sheet name, you simply have to preface the rangename string with the sheet name and an exclamation point. -- http://HelpExcel.com 1-888-INGENIO 1-888-464-3646 x0197758 "Barb Reinhardt" wrote: I have the following in a macro ActiveWorkbook.Names.Add Name:=rangename, RefersToR1C1:=seriesrange This works to define workbook names. Is it possible to define a worksheet specific name? I have the sheet name defined as "sht" and am wondering what I need to change if it can be done. Thanks in advance, Barb Reinhardt |
Defining worksheet specific range names
Like so
worksheets("Sheet1").names.add name:="Jim",refersto:=range("A1:B1") -- HTH Bob Phillips (remove nothere from email address if mailing direct) "Barb Reinhardt" wrote in message ... I have the following in a macro ActiveWorkbook.Names.Add Name:=rangename, RefersToR1C1:=seriesrange This works to define workbook names. Is it possible to define a worksheet specific name? I have the sheet name defined as "sht" and am wondering what I need to change if it can be done. Thanks in advance, Barb Reinhardt |
All times are GMT +1. The time now is 11:08 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com