Thread: Setting a Range
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jan Karel Pieterse Jan Karel Pieterse is offline
external usenet poster
 
Posts: 535
Default Setting a Range

Hi Tempy,

I am trying to set a named range automatically. The problem is that the
range varies daily so i thought of using "cntrl/shft *" to select the
range. I treid recording a macro but it gives me the row & column
numbers and i can not use that.
Can somebody help me with this please.


You might consider defining a dynamic range:

Use e.g. this formula in the Refersto box of the name:

=OFFSET(Sheet1!$A$1,0,0,COUNTA(Sheet1!$A:$A),COUNT A(Sheet1!$1:$1))

The formula will count all entries in Column A to determine the number of
rows and all entries on row 1 to determine the number of columns to use,
starting from cell A1.

If you use defined names a lot, consider downloading the
Name manager (by Charles Williams, Matthew Henson and
myself) from:

www.jkp-ads.com

or

www.bmsltd.ie/mvp

or from:

www.decisionmodels.com/downloads.htm

Regards,

Jan Karel Pieterse
Excel MVP
www.jkp-ads.com