View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Bob is offline
external usenet poster
 
Posts: 972
Default Assigning named range to a 2-dimensional array

I just discovered that by removing ".Value", it fixes the "object required"
error message problem.

But now I have another issue. Since the size of the named range will vary
over time, is there a way I can determine the number of non-blank elements in
the array?

Thanks again for any help.


"Bob" wrote:

I have a named range ("AdjHoursLookup") that currently occupies 12 cells (3
rows x 4 columns), but the number of cells will vary over time.

Is it possible to assign the named range to a 2-dimensional array? When I
excute the following two lines of code, for example, I get an "object
required" error message.

Dim AdjHoursArray As Range
Set AdjHoursArray = Range("AdjHoursLookup").Value

Any help would be greatly appreciated. Thanks.