![]() |
Macro Recording
Can anyone explain why when I record a macro which names a range, the macro
records ActiveWorkbook.Names.Add Name:="New NamedRange", RefersToR1C1:= _ "='Cricket Shirts'!R1C1:R26C5" I am not aware of any setting that tells it to record in RowColumn notation, I certainly do not have that option ticked in Options | General. Can anyone explain why the address of the range is not in normal alpha numeric notations. PWS |
Macro Recording
Paul
Its just the way Excel works. R1C1 is the active cell and Excel refers to it in RC notation. Heres one I recorded Sub Macro1() ' Macro1 Macro ' Macro recorded 01/05/2004 by Peter Atherton Range("B16:B20").Select ActiveWorkbook.Names.Add Name:="Rng", _ RefersToR1C1:="=Sheet4!R16C2:R20C2" End Sub Note when the range is selected first the AlphaNumeric notation is used. Normally you would not record a one off event like createing a range name but you might want to refer to it later. The sub below selects the name just created. Sub Selct() [rng].Select End Sub Regards Peter -----Original Message----- Can anyone explain why when I record a macro which names a range, the macro records ActiveWorkbook.Names.Add Name:="New NamedRange", RefersToR1C1:= _ "='Cricket Shirts'!R1C1:R26C5" I am not aware of any setting that tells it to record in RowColumn notation, I certainly do not have that option ticked in Options | General. Can anyone explain why the address of the range is not in normal alpha numeric notations. PWS . |
All times are GMT +1. The time now is 05:06 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com