Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I am trying to name a variable range in a macro. I have recorded the
actions, but it always references the range in R1C1 terms - which therefore always selcts the exact same area, not the variable area. The code I am using is below. I want to change the "ActiveWorkbook.Names......" line to use the CurrentRegion I have selected in the line above. BUT i dont know how. Any help gratefully accepted. Thanks Andrew Sub Macro9() ' Range("A1").Select Selection.CurrentRegion.Select ActiveWorkbook.Names.Add Name:="obook", RefersToR1C1:= _ "=production!R1C1:R144C28" Range("A1").Select End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Copy/Paste using a macro that identifies occuoied range | Setting up and Configuration of Excel | |||
consolidation of tables in excel with text and figures | Excel Worksheet Functions | |||
checking that cells have a value before the workbook will close | Excel Worksheet Functions | |||
Name a Range - Macro | Excel Worksheet Functions | |||
Match function...random search? | Excel Worksheet Functions |