Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Charting in a cell

19 views
Skip to first unread message

Dave_AD

unread,
Feb 11, 2007, 11:55:01 AM2/11/07
to
Does anybody have some information in creating a line chart that resides
within a cell that reflects the pattern of a row or column of numbers?
Someone at work referred to such a thing as a "spark line". Any VBA out there
to help with something like that ?
--
Dave_DD

Bernard Liengme

unread,
Feb 11, 2007, 12:06:36 PM2/11/07
to
Put some numbers in A1:A6 (1,5,8,10,15,12)
In B1 enter =REPT("-",A1)
Copy down to B6
Adjust column width of B as needed
Try other symbols in place of "-"
That's how we did it in Fortran in the 60's
OR get Excel 2007
best wishes
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"Dave_AD" <Dav...@discussions.microsoft.com> wrote in message
news:E036AE99-0F69-45A3...@microsoft.com...

Del Cotter

unread,
Feb 11, 2007, 2:55:09 PM2/11/07
to
On Sun, 11 Feb 2007, in microsoft.public.excel.charting,
Bernard Liengme <blie...@stfx.TRUENORTH.ca> said:

>Put some numbers in A1:A6 (1,5,8,10,15,12)
>In B1 enter =REPT("-",A1)
>Copy down to B6
>Adjust column width of B as needed
>Try other symbols in place of "-"
>That's how we did it in Fortran in the 60's
>OR get Excel 2007

Bernard, that's not a sparkline. That's one number in a cell, expressed
as a column of a certain length. A sparkline is a series of numbers,
expressed as a tiny line or bar graph.

I have implemented sparklines in Excel, by simply creating a minimal
line or bar chart as an embedded frame, and dragging its corners into a
single cell while pressing the Alt key, to snap the frame to the cell
corners. The frame can then be moved, sized and copied with the cell,
although you'll have to change the data series it refers to by hand.

I find it's difficult to shrink the entire chart into one regular height
cell, so I double all the cell heights up and use 20 point text. If you
like, you can just snap it to two cells instead, but a true sparkline
should be the height of a single line of text.

Bissantz & Company GmbH offer a sparkline add-in for Excel called
SparkMaker:

http://www.bissantz.de/sparklines/sparkmaker.asp

This product takes a different approach: Bissantz have created a custom
font with bars, pies, dots and lines that, when used with their user
defined functions, creates a sparkline in the cell where the function is
entered. bonavistasystems.com also has a product called Microcharts, but
I haven't evaluated it.

--
Del Cotter
NB Personal replies to this post will send email to d...@branta.demon.co.uk,
which goes to a spam folder-- please send your email to del3 instead.

Dave_AD

unread,
Feb 11, 2007, 3:23:01 PM2/11/07
to
Thanks for the suggestions. Seems to be a blog thread in Daily Dose of Excel
that gets me part of the way there through a VBA function,
--
Dave_DD

Jon Peltier

unread,
Feb 11, 2007, 9:16:19 PM2/11/07
to
Dave -

There are a few of these threads in Daily Dose. I had a little fun with it,
but haven't gotten anything really useful yet.

The third party sparkline utility I tried (Bissantz, but there are others)
led to problems with phantom VB projects, that is, projects remained in the
VB Editor after the parent workbook was closed. The only thing that removed
these phantom VB projects was removing the utility.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
http://PeltierTech.com
_______


"Dave_AD" <Dav...@discussions.microsoft.com> wrote in message

news:40CD1BEF-3B14-4F89...@microsoft.com...

Kelly O'Day

unread,
Feb 11, 2007, 11:32:53 PM2/11/07
to
Dave

I have an alternative approach to sparklines with custom fonts.

This link shows my chart-in-cell and downloadable example. I also have an
example of how to size cell with VBA.

http://processtrends.com/pg_charts_chart_in_cell.htm

Kelly

http://processtrends.com


"Jon Peltier" <jonxl...@SPAMpeltiertech.com> wrote in message
news:uwnGNvk...@TK2MSFTNGP02.phx.gbl...

Gklass

unread,
Feb 12, 2007, 11:52:15 AM2/12/07
to
Try the character "g"
as in
=REPT("g",A1/x)
where x is used to scale the lines

Then use the Webdings font for a bar...

On Feb 11, 10:32 pm, "Kelly O'Day" <d...@comcast.net> wrote:
> Dave
>
> I have an alternative approach to sparklines with custom fonts.
>
> This link shows my chart-in-cell and downloadable example. I also have an
> example of how to size cell with VBA.
>
> http://processtrends.com/pg_charts_chart_in_cell.htm
>
> Kelly
>
> http://processtrends.com
>

> "Jon Peltier" <jonxlmv...@SPAMpeltiertech.com> wrote in message

fernando cinquegrani

unread,
Feb 15, 2007, 3:52:10 AM2/15/07
to

Jon Peltier

unread,
Feb 15, 2007, 8:25:36 AM2/15/07
to
Fernando -

This is EXCELLENT!

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
http://PeltierTech.com
_______


"fernando cinquegrani" <f.cinq...@xroxxmxxxa.it> wrote in message
news:e7gLb6NU...@TK2MSFTNGP04.phx.gbl...

Garth T Kidd

unread,
Feb 16, 2007, 5:02:30 AM2/16/07
to
On Feb 15, 7:52 pm, "fernando cinquegrani"
<f.cinquegr...@xroxxmxxxa.it> wrote:
> http://www.prodomosua.eu/zips/sparklines.xls

Nice! How do you get the sparklines pictures in the cells to update?
It can't be voodoo, but it sure looks like it. :)

Yours,
Garth.

Jon Peltier

unread,
Feb 16, 2007, 12:39:10 PM2/16/07
to
Copy the range of cells under the chart
Hold Shift, select the Edit menu, select Paste Linked Picture
Move and resize the pasted picture over the desired cell.

The pasted linked picture updates automatically thanks to the link.

A quick note to Excel 2007 users. If you use Print or Print Preview of a
range containing linked pictures of a chart, the linked picture and the
original chart will be corrupted. This bug has been filed with Microsoft.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
http://PeltierTech.com
_______


"Garth T Kidd" <gar...@gmail.com> wrote in message
news:1171620150.5...@v33g2000cwv.googlegroups.com...

0 new messages