View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Robert Bruce[_2_] Robert Bruce[_2_] is offline
external usenet poster
 
Posts: 108
Default How do I use a Macro to define a Named Range

Roedd <<EKUFan wedi ysgrifennu:

I have a spread sheet in which I have to continually update a named
range. The number of columns is static and the number of rows grow
with new information every day. The named range includes columns A
thourgh CX. There my not always be an entry in Column A. The first
Column where there will always be information is column B. How do I
use a macro to do this.


No macro required. Assuming your sheet is called Sheet1, Create a name
referring to the function
=Sheet1!$A$1:OFFSET(Sheet1!$B$1,COUNTA(Sheet1!$B:$ B)-1,100)

This range will expand as rows are added.

Rob