Add the name to the Names collection associated with the worksheet, which only includes the names that are local to that worksheet : Name Create « Excel « VBA / Excel / Access / Word
Add the name to the Names collection associated with the worksheet, which only includes the names that are local to that worksheet
Sub nameRef()
Worksheets("Sheet1").Names.add name:="Costs", RefersTo:="=Sheet1!$F$10:$F$12" End Sub
'Using the Name Property of the Range Object Sub name()
range("A1:D10").name = "SalesData" End Sub