Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Name a range dynamically
I have a list I'm using in a vlookup. The problem is that
this list changes drastically in size and I think by naming the range (i.e. database, stuff, etc.) that I could use that name in my vlookup. How do I program a range to have a name in VBA? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Name a range dynamically
Jerry
One way, select a cell in the list and alter the columns to suit. nr = ActiveCell.CurrentRegion.Rows.Count - 1 Set Status = Range(Cells(2, 4), Cells(nr, 4)) Regards Peter -----Original Message----- I have a list I'm using in a vlookup. The problem is that this list changes drastically in size and I think by naming the range (i.e. database, stuff, etc.) that I could use that name in my vlookup. How do I program a range to have a name in VBA? . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Sum a dynamically-defined range | Excel Discussion (Misc queries) | |||
How can dynamically set a range name in a HLOOKUP command? | Excel Worksheet Functions | |||
Setting Range Dynamically | Excel Discussion (Misc queries) | |||
Dynamically Generated Range using Macro | Excel Worksheet Functions | |||
Dynamically set a range? | Excel Worksheet Functions |