View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ed Ed is offline
external usenet poster
 
Posts: 399
Default create named range in each sheet in workbook

I would Dim wks As Worksheet and Dim strName As String, then
For Each wks In WhateverWorkbook
strName = wks.Name
strName = strName & "FilterRange"
' set range, using strName as the name
Next wks

HTH
Ed

"davegb" wrote in message
oups.com...
I'm using this code to delineate the range I want filters applied to:

Range(Range("b3"), Range("b3").End(xlDown).End(xlToRight) _
.Offset(-1, 2)).Select

Now I want a macro to go into every worksheet in the workbook, the
number may vary, and create a named range called FilterRange with the
worksheet's name. Than I can use that named range to apply filters to
from buttons/macros. Can anyone help me here?
Thanks in advance.