Site menu:

More information per pixel!

Categories

Site search

The Missing Link (Part 2)

If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!

The Internet has introduced us to the great idea of providing more detail with just a click using hyperlinks. Now our new, free Excel add-in lets you do just that in your Excel dashboard.

As Andreas mentioned last time, our new function - the ParamLink - is perfect for drilling into the detail of a dashboard. As we’ll see in this series of posts, it can be a lot more flexible and powerful than just that. This time, we’ll create a simple example with the ParamLink acting as a method for setting some workbook variables.

The ParamLink Formula

Using the ParamLink formula doesn’t require much effort.

=PARAMLINK([linkLocation], [friendlyName], [linkType], [parameterAddress1], [parameterValue1],…, [parameterAddress13], [parameterValue13])

It allows you to specify a location to link to (for example, “A1″ with quotes will cause a jump to cell A1 when the link is clicked); the text to appear in the link cell; the type of link (1 for hyperlink, 2 for double-click); and a set of address-value pairs.

These pairs allow you to specify a cell or name (add ‘=’ to the start of the value to target a name) to be changed, and the new value to be used when the link is clicked. For a complete reference, see our in-depth article.

A Simple Example

Let’s get started by creating a data table, with an Excel chart showing a row of data. We’ll use ParamLink hyperlinks to zoom the chart to the row that we’re interested in.

We’ll start with some data that I created:

image

Next we’ll create some Excel names (using Insert/Name/Define…), which we can use for the chart’s data ranges:

ChrtRow =2
ChrtName =INDEX($A$2:$A$8, ChrtRow-1)
ChrtData =INDEX($B$2:$M$8, ChrtRow-1,)

 

And finally we can create an Excel line chart based on those names - we’ll use =<BookName>!ChartName (e.g. =Book1.xls!ChrtName) for the series name and =<BookName>!ChartData (e.g. =Book1.xls!ChrtData) for the series data range.

image

Now that we have the data and chart set up, we can use the ParamLink function to activate it! In the place of the product names, we’ll use this formula:

=ParamLink(,”ProductA”,,”ChrtRow”,”=”&ROW())

…and now we have a set of hyperlinks, which drive the series in the chart.

image

Next time, we’ll look at a slightly more complex example where we’ll use ParamLink to allow us to link a MicroChart sparkline using ParamLink.

Comments

Comment from Jon Peltier
Time: July 31, 2008, 7:26 am

Using names as chart source data is a powerful tool. In Excel 2007, the technique works as before, but some names which worked in previous versions are off-limits in 2007. If a name begins with “Chart”, it cannot be used in the series formula.

I’d never encountered this glitch, as I use “cht” as a shorthand, but a number of bloggers have stated that names can no longer be used in 2007 charts. Their problem was in using “Chart” as a prefix to the name, as you use here (ChartName and ChartData).

Comment from Andreas Lipphardt
Time: July 31, 2008, 7:49 am

Jon,

Thanks for mentioning the “Chart” name issue with Excel 2007.
I was not aware of this one.

Andreas

Comment from Alvaro Ledesma
Time: July 31, 2008, 7:59 am

Antonio, to make it work I had to change the INDEX arrays to A2:A8 (ChartName) and B2:M8 (ChartData).
I have a question: to make the series name look like the chart title I am using an arbitrary data point label (set on the series name), formating it and placing it accordingly. Swithcing from series to series makes the title to move around a little. Is there any way to avoid this?

Regards

Alvaro

Comment from Andreas Lipphardt
Time: July 31, 2008, 8:52 am

Alvaro,

Thanks for pointing out the wrong references, we fixed that in the post. Regarding the data label problem, does it help to make the plot area a bit smaller, so that there is some space for the data label on the right.

Andreas

Comment from Alvaro Ledesma
Time: July 31, 2008, 2:02 pm

Never mind. What I was trying to do is using a Data Label as a Chart Title to make it variable. I corrected it following Jon Peltier’s “Link Chart Text to a Cell” and now works like a charm!

Comment from Jorge Ceballos
Time: October 21, 2008, 1:12 pm

Does the add in works for the new Office 2008 for Mac?

Thanks

Comment from Andreas
Time: October 22, 2008, 1:53 am

Jorge,

I never tried it on Office 2008 for Mac, but theoretical it should work

Andreas

Write a comment