SOLVED

New Contributor

# growing table

I'm using Excel to keep track of my weight, e. g.

Jan 1 90
Jan 2 91
Jan 3 92

The table grows continually on a daily basis, the full-blown table containing several thousand rows
to cover the last decade or so.

I generated a diagram for the data by marking it and selecting a line plot.

I would like the diagram to automatically include ALL the data in particular any new data which I append, of course, ignoring any empty cells at the end of the table.

How do I do this?

Also consider a function, e. g. =MAX(B3:B8000) assumming that 3 is first row or the table and the weight is in column B. Is there more elegant formula than this,i.e., not using the arbitrary and perhaps cryptic B8000.
=MAX(B3:B) doesn't work.

5 Replies

# Re: growing table

Excel allows you to define dynamic named ranges - see for example Dynamic Named Range.

In your example, you could create a range named XValues defined as

=OFFSET(Sheet1!\$A\$1,2,0,COUNTA(Sheet1!\$A:\$A)-2,1)

assuming that A1 and A2 are filled, but the dates begin in A3. Sheet1 is the name of the sheet with data.

Similarly, create a range named YValues defined as

=OFFSET(Sheet1!\$B\$1,2,0,COUNTA(Sheet1!\$B:\$B)-2,1)

You can now specify =Sheet1!XValues as the range for the category axis values of your chart, and =Sheet1!YValues as the range for the series.

And you can use =MAX(YValues) to return the maximum weight.

best response confirmed by Maxwellq (New Contributor)
Solution

# Re: growing table

@Maxwellq Why not simply convert your data into a structured table (Ctrl-T) and run your graph off that table. Such tables expand automatically and anything referring to the table as a whole or a column that is part of the table will expand with it as demonstrated in the attached file. Just add a few lines of dates and weights at the bottom and see what happens.

# Re: growing table

This is very useful to know.

Thank you very much.

# Re: growing table

Yes! This is the stress-free “no sweat” solution.

The design of structured tables heeds the caveat not to use constants and absolute addresses, which is essentially the issue in the maintenance of maxwellq.xlsx.

To address my second question in maxwellq.xlsx you can add the function =MAX(WeightTable[Weight]) (although the usage doesn’t appear to work in the older .xls version).

I removed the ostentatious blue stripes by reformatting the cells with data using the fill-color “white”.

Thank you very much.

# Re: growing table

@Maxwellq Uploading my original file again, with several formulae in column N, that pick the highest weight from column B. See which one suits you best.