Named Range
This code takes the used range of a spreadsheet and assigns a name of
Database to it.
Useful for pivot tables or advanced filtering. Courtesy of Debra
Dalgleish
Public Sub SetNamedRange()
ActiveWorkbook.Names.Add NAME:="Database", _
RefersTo:=Worksheets("Data").UsedRange
End Sub
|