View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Carrie_Loos via OfficeKB.com Carrie_Loos via OfficeKB.com is offline
external usenet poster
 
Posts: 116
Default Macro to define range names

I was hoping for something not so labor intensive but I did end up using your
suggestion. Thanks

john wrote:
without knowing all your ranges tad difficult. But as an idea, I turned macro
recorder on and added your example and got this:

Sub Macro1()

ActiveWorkbook.Names.Add Name:="Week_1_2009", RefersToR1C1:= _
"= Sheet1!R4C2:R7C2"

End Sub

if you copy & paste the code bit as many times as needed & updated the range
reference as required - you would then only need to run macro once to add all
the names.

Just an idea - hope helpful

I have a list of dates associated with Week Nbrs starting in column B, C & D.
Several formulas link to a summary table on another worksheet which counts

[quoted text clipped - 16 lines]
1/6/2009 2009 2
1


--
Message posted via http://www.officekb.com