Name a range dynamically

  • Thread starter Thread starter Jerry
  • Start date Start date
J

Jerry

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?
 
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
 
Back
Top