Dynamic Range for Intentionally Showing Nothing

Meshach

So, I've created a dynamic range for a chart, that's all well and easy.

However, in this chart there are two lines, but I only want one of the lines to show up under certain conditions, else it displays nothing! So I've tried creating my dynamic range as follows

=IF('WorksheetName'!$M$10 ='WorksheetName'!$F$31,'WorkSheetName'!dynamic_range, #N/A)

The problem is that when I do this the chart freaks out. It gives me this error:

Your formula contains an invalid external reference to a worksheet. Verify that the path, workbook, and range name or cell reference are correct, and try again.

If I click "ok" half the time it shows up correctly (that is, the second line disappears and the chart adjusts accordingly) and the other half the time it glitches.

Basically, how do I create a dynamic range for graphing that the chart will understand when I want it to do NOTHING and when I want it to display the range?

Kawi42

You need a second source range, that's cells are just empty. Applying your approach to switch between the filled range (intended to be visible) vs. the empty range (will be invisible), shall solve the issue. Note: The chart parameter "Show empty cells as:" should be set to "Gaps". (Refer to the Hidden and Empty Cells options in the chart's Select Data dialog. This is applicable to X/Y charts mainly.)

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related