ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Naming Cells with Macros (https://www.excelbanter.com/excel-discussion-misc-queries/92941-naming-cells-macros.html)

aynsley

Naming Cells with Macros
 
Is it possible to define cells using macros? I've tried creating a macro by
recording myself naming three cells three different things with the relative
reference on. When I try to apply the macro to a row below, it doesn't name
the new cells.

Ian G

Naming Cells with Macros
 
Yes, it's possible. The code should be something as follows. The new
name should be in quotes and can't contain spaces.

Range("a1").Name = "nametoset"
Cells(1,1).Name = "nametoset"

aynsley wrote:
Is it possible to define cells using macros? I've tried creating a macro by
recording myself naming three cells three different things with the relative
reference on. When I try to apply the macro to a row below, it doesn't name
the new cells.




All times are GMT +1. The time now is 12:32 PM.

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