Making an Auto-Updating Graph with non-continuous data

FarazM

New Member
Joined
Feb 4, 2014
Messages
4
I'm trying to create a auto-updating graph for samples taken from water bodies in the area, I have about 5 columns, the first is the date (continuous), and the other 4 are the different water bodies. However samples aren't taken from every water body each time leaving me with gaps.

I've looked into this a bit and found defining names for columns and the OFFSET formula, however COUNTA does not work with gaps.

Additionally, I have dates entered without data yet that I don't want appearing on my graph, which is why I'm not using a table.

Is there a way to manipulate the OFFSET function, using MATCH, MAX or anything else to help me achieve what I want to do?
 
Last edited:

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
We'll assume the chart already exists and the data table looks like this:

ABCDEF
1CreekLakePondRiverStream
201/01/201414101430
301/02/20142016918
401/03/2014
501/04/2014111722
601/05/2014

<tbody>
</tbody>

We have named ranges for Creek =B2:B6, Lake =C2:C6, and so on. Dates extend from A2 downward.

We'll put the last data point offset in Cell H2. The offset is calculated with Row 2:2 equalling 1.
Rich (BB code):
Cell H2:
=MAX(MATCH(9.99E+307,Lake),MATCH(9.99E+307,Stream),MATCH(9.99E+307,Pond),
     MATCH(9.99E+307,River),MATCH(9.99E+307,Creek))

Enter the formula below in Cell H3. This is the range of dates we want to use as x values or x labels, depending on the chart type.
=OFFSET($A$2, , , $H$2)
I've omitted default arguments in the formula. The result will display as a date serial number. We don't care what value is displayed.

To check that this is the correct range of cells for x, copy the formula, not the cell, and paste that formula in the GoTo dialog's Reference: text box. Ctrl+g or F5, paste, then press Enter or click OK.

Edit the formula in Cell H3 to include the worksheet name for the cell references:
=OFFSET(Sheet1!$A$2, , , Sheet1!$H$2)​
If the sheet name includes spaces, enclose the worksheet name in single-quotes:
=OFFSET('My Data'!$A$2, , , 'My Data'!$H$2)
You can check if it is correct using the GoTo dialog as we did previously.

From here, you can use these two tutorials, from Peltier Technical Services, Inc., to create a dynamic chart:
 
Upvote 0

Forum statistics

Threads
1,215,772
Messages
6,126,814
Members
449,339
Latest member
Cap N

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top