Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Creating range name for a range selection
My existing code is a bit predetermined as in the example:
ActiveWorkbook.Names.Add Name:="CodeLookup", RefersToR1C1:="=CostCodes!R1C2:R200C8" I can't figure out how to change this to refer to the current region selection such as: ActiveWorkbook.Names.Add Name:="CodeLookup", RefersToR1C1;= current selection Mervyn |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Creating range name for a range selection
Mervyn,
Try this out: Range("A1").CurrentRegion.Name = "TestRange" John "Mervyn Thomas" wrote in message ... My existing code is a bit predetermined as in the example: ActiveWorkbook.Names.Add Name:="CodeLookup", RefersToR1C1:="=CostCodes!R1C2:R200C8" I can't figure out how to change this to refer to the current region selection such as: ActiveWorkbook.Names.Add Name:="CodeLookup", RefersToR1C1;= current selection Mervyn |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
VBA - Selection Instead of Range | Excel Discussion (Misc queries) | |||
Narrow Range based on Selection in Another Range | Excel Discussion (Misc queries) | |||
Identifying a selection of a selection of a range | Excel Worksheet Functions | |||
Range Selection | Excel Discussion (Misc queries) | |||
Can I use named range in data range box when creating pie chart? | Charts and Charting in Excel |