Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 31
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sum a dynamically-defined range Hershmab Excel Discussion (Misc queries) 3 December 7th 09 05:14 PM
How can dynamically set a range name in a HLOOKUP command? Ron Excel Worksheet Functions 1 November 7th 07 10:50 PM
Setting Range Dynamically DJS Excel Discussion (Misc queries) 5 December 7th 06 09:51 PM
Dynamically Generated Range using Macro [email protected] Excel Worksheet Functions 2 July 15th 06 08:12 AM
Dynamically set a range? BKGT Excel Worksheet Functions 3 April 27th 06 03:26 PM


All times are GMT +1. The time now is 08:22 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"