ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How do I use a Macro to define a Named Range (https://www.excelbanter.com/excel-programming/373038-how-do-i-use-macro-define-named-range.html)

EKUFan

How do I use a Macro to define a Named Range
 
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.

Robert Bruce[_2_]

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




All times are GMT +1. The time now is 10:58 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com