Hi
An example:
On Sheet1 you have a table, p.e. in columns A:H, with headers in row1.
Column A is a key column, i.e. whenever there are data on row, the cell in
column A is not empty. And there never are gaps (empty rows) in your table.
You can define dynamic named ranges:
from menu select Insert.Name.Define;
in Names field determine a name for range;
in Refers To field, enter value, reference or formula returning a value or
cell reference;
OK.
Now, for our example, define named ranges p.e.
MyTable=OFFSET(Sheet1!$A$2,,,COUNTIF(Sheet1!$A:$A,"<>")-1,9)
MyKey=OFFSET(Sheet1!$A$2,,,COUNTIF(Sheet1!$A:$A,"<>")-1,1)
MyValue=OFFSET(Sheet1!$F$2,,,COUNTIF(Sheet1!$A:$A,"<>")-1,1)
When you add or remove rows in your table, those ranges will always adjust
automatically, the range MyTable returns the range Sheet1!A2:Hx, MyKey
returns the range Sheet1!A2:Ax and MyValue returns the range Sheet1!F2:Fx,
where x is the number of last filled row in table. (Here is demonstrated one
way to define dynamic ranges, but depending on your table design and your
goals, there are possible other definitions too)
Now, whenever you p.e. want:
a) to count the nimber of filled rows in table
=COUNTA(MyKey)
b) to sum all values in MyValue where MyKey=z
=COUNTIF(MyKey,x,MyValue)
to return a value from column H from row where MyKey=z
=VLOOKUP(z,MyTable,9,0)
etc.