Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 17
Default Dynamically Naming a Table of Data

Probably a stupid question.

I can dynamically name a columular data range using the InsertNameDefine
=OFFSET(Sheet!$A$1,0,0,COUNTA(Sheet!$A:$A) function. This allows me to add
data to a list and the named range automatically takes the new data into
account, very handy indeed.

Problem is I need to apply the same dynamic range to a table of data, not
just a single column, so it needs to recognise new data in the rows below and
to columns to the right of the named range.

I tried changing the COUNTA(Sheet$A:A) part of the formula to take the other
columns of data into account (I.e. COUNTA(Sheet$A:ZZ) but it doesn't
recognise this as a valid range.

Any idea how to do this?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 510
Default Dynamically Naming a Table of Data

Hi

The formula for single-column named range is like
=OFFSET(Sheet!$A$1,0,0,COUNTA(Sheet!$A:$A) ,1)
or with column headers in row 1 (as I prefer)
=OFFSET(Sheet!$A$1,1,0,COUNTA(Sheet!$A:$A)-1 ,1)
N.B. I anchored here OFFSET to cell A1, and then moved the reference poit 1
row down, to avoid the named range definition compromised whenever 1st data
row in table is deleted - so long as you keep table header existent, the
named range is OK.

To define a table as named range dynamically, you better have at least one
column in table, which is always filled whenever there are some data in same
row. Usually it is the leftmost column in table, and serves as entry
identifier too - so you can it use as key column whenever you need to use
VLOOKUP function to get some data from this table. The counting of table
rows when defining the table as dynamic range is done then on this column.

P.e. with headers in row 1, the table starting from column A and having 10
columns, and the column A being the identifier
=OFFSET(Sheet!$A$1,1,0,COUNTA(Sheet!$A:$A)-1 ,10)


P.S. When there is no column in table which serves as identifier naturally,
I usually add a counter column as leftmost into table, with formula which
calculates row numbers for this table.


Arvi Laanemets



"Ivor Davies" wrote in message
...
Probably a stupid question.

I can dynamically name a columular data range using the InsertNameDefine
=OFFSET(Sheet!$A$1,0,0,COUNTA(Sheet!$A:$A) function. This allows me to
add
data to a list and the named range automatically takes the new data into
account, very handy indeed.

Problem is I need to apply the same dynamic range to a table of data, not
just a single column, so it needs to recognise new data in the rows below
and
to columns to the right of the named range.

I tried changing the COUNTA(Sheet$A:A) part of the formula to take the
other
columns of data into account (I.e. COUNTA(Sheet$A:ZZ) but it doesn't
recognise this as a valid range.

Any idea how to do this?



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Dynamically Naming a Table of Data

Include the width argument by counting row 1:

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

--
Biff
Microsoft Excel MVP


"Ivor Davies" wrote in message
...
Probably a stupid question.

I can dynamically name a columular data range using the InsertNameDefine
=OFFSET(Sheet!$A$1,0,0,COUNTA(Sheet!$A:$A) function. This allows me to
add
data to a list and the named range automatically takes the new data into
account, very handy indeed.

Problem is I need to apply the same dynamic range to a table of data, not
just a single column, so it needs to recognise new data in the rows below
and
to columns to the right of the named range.

I tried changing the COUNTA(Sheet$A:A) part of the formula to take the
other
columns of data into account (I.e. COUNTA(Sheet$A:ZZ) but it doesn't
recognise this as a valid range.

Any idea how to do this?



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
Dynamically Changing HLOOKUP table PatK Excel Worksheet Functions 4 September 29th 06 03:51 AM
Pivot Table Group Naming Arun Excel Discussion (Misc queries) 3 June 26th 06 10:58 PM
how do i link to a pivot table to get data dynamically Michael001 Excel Worksheet Functions 2 February 23rd 06 10:23 AM
Naming a Pivot Table??? ddawg09 Excel Discussion (Misc queries) 3 February 11th 06 08:44 PM
Dynamically compare two slightly different copies of a table David Humphries Excel Worksheet Functions 1 July 26th 05 10:47 PM


All times are GMT +1. The time now is 02:53 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"