Hi,
I’m new to Excel macros (today!) and need some help. My objective is to assign individual range names to 1300+ rows in a worksheet. The numeric identifier (product #) for each row of info is in column A. I would like each range to have a name comprised of the letters nm, immediately followed by the product ID contained in column A. For example: the range name for the first row would be “nm1258”, the second row would be “nm1262”, etc. I realize that to automate this naming process the macro will need to use relative information so that it can “walk down” the spreadsheet one row at a time.
I tried a recorded macro (below) that does not work because it uses abosulte addressing.
————————————–
Sub name_range()
‘
‘ name_range Macro
‘ Macro recorded 9/20/2005 by Bill Gillan
‘
‘ Keyboard Shortcut: Ctrl+n
‘
ActiveCell.FormulaR1C1 = “118”
Range(“A6:F6″).Select
ActiveWorkbook.Names.Add Name:=”nm118″, RefersToR1C1:=”=MASTER!R6C1:R6C6”
Range(“A7”).Select
End Sub
——————————————————————–
How can I fix this or write a new macro to automate my naming process. I know this is a lot to ask, but any help / guidance is greatly appreciated!
Thanks,