ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Define Name in active cell (https://www.excelbanter.com/excel-worksheet-functions/50296-define-name-active-cell.html)

Danny

Define Name in active cell
 
Hi,

I try to define names in some cells. However, when I add data and sort the
workbook, the Defined names are moved. In the sample below, the defined name
will always be at Row 17 Column 4.

How can I reference to the "Defined Name" alone?

Thanks

Range("D17").Select
ActiveWorkbook.Names.Add Name:="nmnm", RefersToR1C1:="=Sheet1!R17C4"


All times are GMT +1. The time now is 03:45 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com