Lightboxing Images in Excel
By Chris Gemignani
November 22, 2006
Find more about:
excel
tools
I received an email out of the blue yesterday asking if its possible to put pictures in Excel comments:
I am working on a media report based on creative templates and wanted to give the end user easy access to a view of the creative and my thought was it would be neat to have the ability to build in a comment like function but with graphics.
As far as I know you can't put images in comments, but maybe we can do better. Web developers have developed a technique called Lightbox that was pioneered by Loresh Dhakar. When you click on a thumbnail the image opens full size in the center of your browser screen and the background is grayed out. Check out an example here.
Can we do the same in Excel? Absolutely. Download these two files to see how.
media.jpg (save to the root of your C:\ drive)
Here's a simple report in Excel Lightbox.
Clicking the Show button brings up the lightbox view. The image is dismissed by clicking on it.

This could be improved and extended in lots of ways. The image could be fetched from a URL. Thumbnails could be automatically generated. I'd love to see your ideas on how to extend this.
Godin, Tufte and Types of Infographics
By Chris Gemignani
November 20, 2006
Find more about:
analytics
tufte
visualization
A few days ago Zach wrote about Seth Godin's take on Edward Tufte. You know you're really onto something when your first three comments include: "Seth Godin is out of his gourd and totally wrong." and "Hallelujah, Seth!!!!!" (note the five exclamation points).
Let's start with some facts:
- Godin is a provocateur. "I think this is one of the worst graphs ever made," he says about the Napoleon graph. That's hardly a well-reasoned statement—but it makes a point. Personally, I think Godin's in way over his head when talking about what graphs are for.
- Tufte is a provocateur. "This is, for example, the conclusion of sparkline analysis in Beautiful Evidence, where the idea is to make our data graphics at least operate at the resolution of good typography (say 2400 dpi).", he writes. This provocation is more subtle than his well documented aversion to PowerPoint. He's saying that a computer screen is not an effective tool for data graphics.
- We are provocateurs, too. Pitting these luminaries against each other with only a brief amount of context is a recipe for delightful blog swirl and discussion.
In a battle between provocateurs it's best to at least keep your sense of humor about you. You should also be careful and clear when defining your terms.
There are at least two categories for infographics: exploratory and explanatory. A great example of exploratory infographics is what Hans Rosling is doing with Gapminder. This shows us that we can use infographics to go on a personal journey of discovery to understand data. I choose what questions to explore and how to represent the data. Exploratory graphics can be quite complex because I maintain a thread of context in my mind as I explore the data. Animation is very useful here to help maintain context while changing dimensions.
Explanatory graphics are at best the distilled product of exploration and at worst, as Tufte often points out, a tool of deception. Explanatory graphics are often used to establish facts to guide a discussion. "We're selling more widgets than wodgets! The widget sales trend is up!". I'm sure this is what Godin is talking about: "I think you're trying to make a point in two seconds for people who are too lazy to read the 40 words underneath."
Tufte has done a great job at increasing awareness of good information display. On the other hand, he promotes graphs that are strongly tied to a specific context—a facet of the data that they are illustrating. For instance, the Minard graph is a story about the survivors of Napoleon's march. It does not directly illuminate the battles fought, or how men died, or the story of the armies that faced Napoleon, or the demographics of his army, or the strategic choices Napoleon faced. While this famous graph illustrates many dimensions, it obscures many others, and we need to be aware about this editorial judgment.
Tufte frustrates on a number of levels. He is enormously influential in business. Businesses send people to his seminars and they come back energized with the essential truthfulness of his message. Yet weeks later those principles are abandoned by the lack of practicality of his message. No one in business is going to design a graph in Adobe Illustrator as he can. They use Excel. Seldom can we spend days or weeks refining and testing a graph. The work must be done and then we move on.
Notes:
The Google Video links here jump directly to a point in the presentation. You can create direct links like this:
http://video.google.com/videoplay?docid=-4101280286098310645#17m26s
The #17m26s appended to the end of the URL jump you to 17 minutes and 26 seconds into the video.
Thanks for all the comments on the previous post, but I wanted to single out Jorge Camoes for a particularly level-headed comment. Thanks.
Some more discussion can be found at Emergent Chaos were Thomas Ptacek has posted an insightful comment.
3 comments
Kurtis said:
You said:
No one in business is going to design a graph in Adobe Illustrator as he can. They use Excel. Seldom can we spend days or weeks refining and testing a graph. The work must be done and then we move on.
I reply:
True, but I created a set of "partially Tufte-fied" graphs and saved them in Excel's graph templates folder. They're templates -- I did the work once and can reuse it over and over.
Is my solution perfect? No: some of Tufte's design recommendations are difficult to do in Excel, which is why I call my templates only partially Tufte-fied. I've found that my incomplete measures are still much easier to read and understand than Excel's default ... and my colleagues agree.
YMMV
zaxl said:
Hi, some nice but sad infographics:
Lethal Beauty / The Allure: Beauty and an easy route to death have long made the Golden Gate Bridge a magnet for suicides
http://sfgate.com/cgi-bin/object/article?o=2&f=/c/a/2005/10/30/MNG2NFF7KI1.DTL
You still can add a different color to differentiate by year, but it can be too much information.
regards,
zaxl said:
It's me, again. Now with Le Grand Content: "Le Grand Content examines the omnipresent Powerpoint-culture in search for its philosophical potential."
http://www.clemenskogler.net/grandcontent
regards,
Add a comment
Godin's take on Tufte
By Zach Gemignani
November 10, 2006
Find more about:
design
presentations
visualization
Seth Godin's presentation at the Gel 2006 conference is a light-hearted romp through things that are "broken—illogical signs, confusing user interfaces, and flawed marketing tactics. Seth and Mark Hurst have an accompanying web site (This is broken) and a list of seven reasons why things end up broken. My favorite: "I'm not a fish" (people who create things but have no ability to put themselves in the position of the user) is at the core of our complaints about poor reporting interfaces.
My favorite part is when Seth takes on Tufte's favorite infographic, Napoleon's March to Moscow:

Tufte is really proud of this graph. He says this is the best graph ever made.
I think he is completely out of his gourd and totally wrong. I think this is one of the worst graphs ever made.
He's very happy because it shows five different pieces of information on three axes and if you study it for 15 minutes it really is worth 1000 words.
I don't think that is what graphs are for. I think you are trying to make a point in two seconds for people who are two lazy to read the forty words underneath
To make me take 15 minutes to study it doesn't make sense. And I thought about it and I was going to jump all over him, then I moved it to this section, 'cause he picked it because it is broken on purpose. For the kind of person that you want to reach, they want to read a complicated, difficult to understand graph and get the satisfaction of figuring it out.
Sometimes the best thing to do it so break it for the people you don't care about and just make it work for the people you do.
I think Seth has it just right. Personally, I can hardly resist a well-constructed infographic, but I have an unnatural interest in data. For the many business users, better to construct information displays that are simple and to the point.
P.S. In the comments, you'll find a thoughtful and heated debate about this graphic and the danger of simplifying information displays. Simon Raybould comments that we might benefit by deconstructing the Minard graphic to make it more accessible to certain audiences. With that same thought in mind, I had set out to find the underlying data for Napoleon's March. I thought it might be an interesting challenge to consider alternative ways to present this information—under the theory that different audiences require different approaches to absorb information. Here is the spreadsheet with the data—thanks to Robert Allison. It comes from this fascinating page that shows a gallery of re-constructions of this famous graphic.
18 comments | Show all comments only the last 5 are shown
Clint said:
I'd have to disagree with Mr. Godin on this one. I think that getting the main point of Minard's graph - something like 'Napoleon's March on Moscow was disastrous' - happens very quickly, but like a good book, successive re-reads expose greater details that you weren't expecting. It does take time to read this chart in its entirety which is the joy for us data hounds but the main point is easily grasped at first glance.
derek c said:
"I don’t think that is what graphs are for. I think you are trying to make a point in two seconds for people who are two lazy to read the forty words underneath"
Seth Godin is out of his gourd and totally wrong. As Einstein said, you should make things as simple as possible, *but not simpler*.
I few days ago, you highlighted one of <a href="http://www.juiceanalytics.com/weblog/?p=254" rel="nofollow">Excel 2007's insane design decisions</a>, and seemed puzzled how they could justify what they did. You now have the answer: Microsoft, and their user base, are Seth Godins. I've always known them by the name of "pointy haired bosses".
Tom (Wash DC) said:
Hallelujah, Seth!!!!! I think that more than some of Tufte's work is "the emperor's new clothes." The graph referenced in this email (Napoleon's March to Moscow) is a perfect example. I think we owe Tufte lots of credit for identifying the art of visualization as a real discipline or field that merits attention in its own right. But I think the field has moved on well beyond his work, particularly with new computing technology, and there's lots of terrific and amazing stuff that far surpasses anything he's done -- including the terrific work of Juice Analytics. (Full disclosure -- I have no association with Juice Analytics; in fact, I don't even know who these folks are; I was just lucky enough to have someone forward me their emails.)
Long live the iconoclasts!
Ian Thomas said:
I'm with Tufte (or at least, not with Godin) on this one. You do need a couple of words to explain what the main graphic is showing, but once you have that, the essential lunacy of Napolen's mission becomes very, very clear.
In order to satisfy Seth's requirement that a chart/infographic convey its meaning without any (or hardly any) contextual information, the chart has to either be so incredibly simple that it can hardly convey anything at all, or fall back on one of the well-known chart types (bar, pie etc) that everyone understands. If there's a vocabulary of visualization, that's like saying that everything has to be explained in words of one syllable.
Rob Fay said:
The point of a visual is not necessarily to provide summary information but to clearly communicate an idea to the viewer what might be harder to convey via words.
Before making any infographic, you must know your audience. In the case of data analytics, I agree with Zach that the purpose is to quickly condense and provide summary information. In the case of Tufte's illustration, he is not presenting <strong>data</strong> but <strong>information</strong>. There's a big difference. Frankly, I rather spend 15 minutes absorbing his visual than reading black and white text.
Zach, I'm surprised you have not yet critiqued Dave Sifry's <a href="http://technorati.com/weblog/2006/11/161.html" rel="nofollow">State of the Blogosphere</a> graphs.
Zach said:
Great discussion. I'm having a hard time picking a side -- so I'll straddle as follows:
I give Godin the benefit of the doubt and assume he is overstating to emphasize his point. Even so, I agree that it is easy to fall into the Pit of Simplistic when trying to get to the land of Elegant Simplicity.
The greater danger, in my experience, is not recognizing where your audience is coming from. Your audience may be the "pointed haired boss", but wishing he was a sophisticated data hound and capable of understanding complex, many dimensional info graphics doesn't make it so.
In addition, the Tuftian infographic folks seems inclined to tell the entire story in a single image. I don't see the value in that approach when the important sub-plots can be easily broken out separately or condensed to avoid excessive detail (e.g. the temperature data in the "Napoleon's March" graphic could have been represented with the phrase "damn cold!").
Jorge Camoes said:
Godin' s two seconds vs. 15 minutes doesn't really allow for a serious discussion. IMHO, it doesn't matter how long you take to study a chart. The real question is how much useful data you put in it and how efficiently it communicates. If a high resolution, efficiently designed chart, shows you a general plot and invites you to study the details, probably it is a good chart, even if it takes you half an hour to study. Take a look at the diagram Death and Taxes: can you understand it in 2 seconds? How about any painting by Hieronymus Bosch (general concept, lots and lots of detail)?
I am not sure if Tufte is right. Today, we should be able to design something much better than this one by Minard. But we must fight this misconception that says that a) one must design charts for a 2-second attention span and b) if a chart isn't understood in 2 seconds that is a clear sign of bad design.
George Smiley said:
Simple graphs are made by simpletons for audiences of simpletons -- people who do not wish to trouble their pretty but simple minds analyzing complex data or complicated issues. The president's decision to go into Iraq provides the canonical example of this mindset. There are many simpletons in the world and not a few of them have lucked into positions of power, or aspire to do so. Hence, there is a great deal of demand for this approach and tools that facilitate its implementation.
Jeff said:
Feh, Godin is part of the problem IMO, glitz with no substance. What's wrong with intelligent, thought provoking visuals. Yes, they may take longer than 2.5 seconds to digest but most things worth understanding do.
Greg Stanford said:
Godin's presentation is fun and amusing - the overall point being "Look at what you just did (built, designed, graphed) - does it make sense? Can it be better? Is it needed at all?" So, the friendly challenge to Seth and the Tufte critics is - show me your better graphic! If it is 'broken on purpose,' make it 'your job' to fix it.
Personally, I think the Minard graph is fabulous (and the best part of Seth's show is the soccer field sign...).
Rich Murnane said:
There's a significant difference between "graph" and "graphic" and I can't believe someone like Godin doesn't know this. Contrary to Godin's thinking, there are occasions when data can't just be dumped into Excel and graphed into simple little line graphs. Minard's graphic of a significant world event is one of those times. Is it complicated, yes; is it overly complicated, no. It's definitely not broken and if Godin doesn't like it, rather then just complain about it let's see a better "graphic" (or graph for that matter) that represents the data Minard published.
Talking about Minard's graphic in the same manner as talking about a road sign that only says "Caution: this sign has sharp edges, do not touch the edges of this sign" has got to be a joke. I can't fathom that Godin is that incredibly stupid.
Chui said:
There are different audiences. As Seth himself pointed out. He was being provocative, because he actually makes the case for Tufte later.
Sometimes, chart is like art. Inviting, charming, it gently invites your attention and slowly immerses you in it's study. Then there's a moment of liberation, a ha when you finally find out the multidimensional complexity behind a topic. A graph like the Napoleonic wars invites study better than a linear text.
The are other time when a chart is a picture-bite. A condensed, simplified point that hides the complexity. Not afraid to make it's point across. It's loud. It says here's the data. The world is black and white. But there's a time and a place for these charts too.
Simon Raybould said:
How about a mid-way compromise? I must admit I've used this graphic on my <a href="http://www.curved-vision.co.uk" rel="nofollow">presentation training skills courses</a> and got mixed responses. Some people think it's fantastic, something it's just awful. (Out of interest, I'm trying to look at their Myerrs-Briggs preferences 'cos I think it could be corellated.)
My current take is that it's got a lot of information and - once you've got your head around it - it's a great piece of work; but there's the rub as has been pointed out... you've got to get your head around it and work at it.
So surely the solution is to deconstruct it and show it incrementally in a series of building slides showing gradually more and more of the graphic? The solution to me would be to have a simple line showing the route but to have the wideline (the graph but) revealed a couple of months at a time, discussing the historical events that caused the width of the line (the number of men) to change.
Just a thought.
Simon
Databikkel » Blog Archive » Mooie dashboards ontwerpen said:
[...] Juice analytics heeft 1, 2 posts over een videopresentatie van Seth Godin waarin hij de beroemde Napoleon-grafiek, volgens Tufte de beste ooit gemaakt, afkraakt. [...]
Analytical Engine » Say it with Marimekko Charts said:
[...] PS: If you are interested in interesting ways to represent data, check out some recent postings from Juice Analytics (1,2) and Information Aesthetics blog. [...]
Mark Roudebush said:
I like Seth Gordin's presentation and thoughts on things being "broken". I think however we're all (Seth included) missing a large point.
Seth says, "I don't think that is what graphs are for. I think you are trying to make a point in two seconds for people who are two lazy to read the forty words underneath"
The idea that he mentions isn't relevant to the example. Napoleon's March is not a "40 word" story. Seth is right in the notion that graphs should help people understand larger amounts of information quickly. This graph takes a very large story/ data set and communicates it much quicker.
Matt said:
The ability to read graphs is not only necessary, but it marks high intelligence. Any educated human should be able to interpret data from a well made graph.
The amazing thing about this graph is that I just learned a lot about napoleon's march by reading it. Anyone who criticizes this graph should have second thoughts on the amount of data presented in this amazing piece.
Mark said:
Mr. Godin seems to be all about fast and easy. He should work for McDonalds and stop whining. If you read the counterpoint book "Think" to Godin's "Blink", genuine thoughtfulness seems to always outperform his theory. The point of Minard's graph and therefore Tufte's admiration is storytelling. After reading Godin's book, all 320 pages of it. I could have enjoyed it more if he had boiled it down to one page - but that would have not generated much income for Mr. Godin now would it? I don't believe Minard's motivation was to generate income or get on the speaking circuit when he thoughtfully rendered history. Minard was trying to do exactly what Godin wants. Too bad Mr. Godin "blinked" instead of using his brain.
Tufte is right to admire the graph for it's simplicity, storytelling and art.
Add a comment
Top Resources for Analysts: Excel, Data Analysis, and Business Intelligence
By Zach Gemignani
November 6, 2006
Find more about:
analytics
bi
[This is part two of a two part series. See the first post for resources about charting, visualization, and presentations.]
If you work with data for a living, the following sites are worth a visit (or a subscription) to learn from some of the best, most passionate practitioners. While we're at it, we are handing out our first annual Juicy Awards celebrating contributions to the analytics community. The categories are:
- Charts and graphs
- Information visualization
- Presentations
- Excel
- Data analysis
- Business intelligence
(Items 1, 2, and 3 were covered in part 1)
Here is an OPML file containing the finalists if you want to subscribe to these feeds (right click and save-as)
Juice Resources for Analysts.opml
***
4. Excel
The Juicy goes to Jon Peltier's Excel Page. Jon shares a wide array of detailed descriptions and tutorials on Excel features. He demonstrates a particular passion for Excel charting.
Best of the rest:
- Process Trends: Kelly O'Day, a FOJ (Friend of Juice) has put together a bunch of tips and tools to help with presenting and working in Excel.
- Daily Dose of Excel: A multi-author blog focused on advanced Excel capabilities (i.e. lots of Visual Basic) and the new Excel 2007.
- Andrew's Excel Tips: Andrew demonstrates his exceptional Excel skills in this blog.
- Tips and Tricks: A huge archive of (mostly) Excel tips.
5. Data analysis (mining, statistical, database marketing)
Winner of the Juicy is KD Nuggets. This is a data mining supercenter--not particularly pretty to look at but offering the data miner a vast directory of resources. You can subscribe to the newsletter here.
Best of the rest:
- MineThatData: An active and well-researched blog about multichannel markeing and database marketing.
- Jim Novo's Drilling Down: Not exactly a blog--but Jim does offer lots of fresh content about customer analytics.
- Data Mining Research: A new find for me, Sandro Saitta reviews books and discusses recent news and applications of data mining.
6. Business intelligence in the enterprise
Winner of the Juicy: Enterprise Data Management, a blog by the VP of Product Marketing at Fair Isaac covering the business intelligence industry and practice. James Taylor has a rare corporate blog that is informative and passionate without feeling like a pitch.
Best of the rest:
- Andy on Enterprise Software: Thoughts on data warehousing, business intelligence, and performance management from an industry insider.
- Hired Brains knowledge repository: Here is a great group of articles and white papers about business analytics by Neil Raden.
- Steve Krause Blog: Written by the VP of Analytic Product, CNET Channel. An interesting read covering a wide range of current topics, including commentary on the use and misuse of data.
- Data Doghouse: "Unleashing observations on the business and technology of performance management, business intelligence, and data warehousing."
- IT Toolbox nurtures a blog farm with dozens of IT-related blogs. Here is the section on business intelligence.
7 comments | Show all comments only the last 5 are shown
bee said:
Your blog stands out among all the sites you note. You guys are truly the best bloggers on the BA front. I checked out all the others you posted and only a few of the more technical ones offer any real food for thought. Most are just selling themselves. Again you rock!
Kevin Hillstrom said:
Thanks for the call-out, I really appreciate it. You see all these referring URLs coming from here, so you have an idea somebody did something nice!
To be honest, I try hard to offer the readers in my niche real food for thought.
James Taylor said:
I'm honored - I do try hard to be useful and I am glad you think I succeed! I thoroughly enjoy your blog also so keep up the good work.
Gregory Piatetsky-Shapiro said:
I usually enjoy reading your blog, but your Juicy award to KDnuggets doubled the enjoyment. Will work on making it more pretty to look at.
Dave said:
Great suggestions. Here's one for you... Use Grazr to allow us all to preview the feeds you're recommending:
http://grazr.com/config.html
You can imbed grazr in a webpage.
Not sure if this code will work in as a ccomment.
<a href="http://grazr.com/gzpanel.html?file=http://www.juiceanalytics.com/downloads/JuiceResourcesforAnalysts.opml" rel="nofollow"></a>
About James Taylor said:
[...] Top Resources for Analysts: Excel, Data Analysis, and Business Intelligence [...]
Indonesian Heritage said:
Great i never thought before .. thank you
Add a comment
Finding zip codes close to an address
By Chris Gemignani
November 1, 2006
Find more about:
excel
geocoding
tools
Just got an email from someone we work with:
I'm researching options for being able to find zip codes within a specific distance from a location. Thus far I've found a couple of desktop applications, ZIP Code Download’s Lookup GXE and Xionetic’s ZIPFind Deluxe, both for about $200.
I was curious if you had any experience or thoughts on either of those, or if you had any other product suggestions for this functionality. As an example, we’re looking to be able to define an audience consisting of contacts with ZIP codes between 20 and 30 miles from Chicago.
This is a pretty common problem. The applications referenced don't seem to bring a lot to the table. Why not stick with the tools you already know. Geocoded zip code lists aren't hard to find (the Yahoo Geocoder, for instance, lets you build your own).
So, here's an Excel-based tool that lets you enter a US address and returns zip codes within a certain number of miles of that address.
Find Zip Codes within Distance.zip
Address lookup is courtesy of the free Yahoo geocoder.
Note: This tool was updated to use the new Yahoo geocoding service.
7 comments | Show all comments only the last 5 are shown
Jorge Camoes said:
If you have a georeferenced list of zip codes, it is just a matter of solving the old theorem of Pythagoras. It is very easy to implement in Excel and since the area is not large, you can skip the factor for sphericity.
Dante said:
This is a great tool. I am, however, experiencing a Run-time error \'1004\'
Daren Richardson said:
Awesome tool.
At first I tried playing with it a bit to see the number of zip codes around me.
Okay that was great, but not all that useful to me.
After a bit of playing with it, I noticed that the coordinates that it produced were in x,y format. Plugging that into a x/y scatter graph, unlocked some of the key extra hidden usefulness of this utility.
By adding a simple x/y graph, and extending the ranges on the returned coordinates, one could graph 50, 250, 1000, or up to 32,000 data points of zipcodes.
At lower levels, it showed the metropolitan areas around my city. Very neat! After a while, I managed to graph the United States (with Alaska) using solely returned data points. how cool?
If you'd like, I could post a file with generated scatter graph. It might be an awesome add-on to that tool.
Michael said:
Very nice tool - thanks! Are you aware of any similar tool(s) that works for Canada?
Jason Curilla said:
Awesome Tool! Thanks a ton. Is there anyway you can use the tool with UK Zip Codes?
Thanks again
zip codes said:
I would recommend http://www.zipcodesmapped.com/ for any US zip code map.
You can use this to find any US zip code maps. You can search by (City, State OR Zip). they have all the maps showing zip codes and major mile streets in all of the united states. The service is free. Search for five Digit Zip Code and find the Maps for all 50 states. A Free ZIP Code Finder which can do wonders for you. <a href="http://www.zipcodesmapped.com/"> Zip codes </a>
zip map said:
I would recommend http://www.zipmap.info/ for any US zip code map.
You can use this to find any US zip code maps. You can search by (City,
State OR Zip). they have all the maps showing zip codes and major mile
streets in all of the united states. The service is free. Search for five
Digit Zip Code and find the Maps for all 50 states. A Free ZIP Code Finder
which can do wonders for you. <a href="http://www.zipmap.info/"> Zip Map</a>


12 comments | Show all comments only the last 5 are shown
Andreas Lipphardt said:
Chris,
This is a very nice idea.
Maybe you could use a transparent light gray for the ShadowBox instead of the fill pattern. The fill pattern is a bit distracting
Andreas
Chris said:
Thanks, Andreas. I chose a dark semi-transparent gray to be similar to the lightbox javascript implementation.
Jon Peltier said:
"As far as I know you can’t put images in comments."
Sure you can:
Select a cell with a comment, go to Insert menu > Edit Comment. Select the comment (click edge of box to exit text-edit mode), go to Format menu > Comment, Colors and Lines tab, click Color dropdown, choose Fill Effects, Picture tab, Select Picture button, and browse to the image file.
Chris said:
Thank you Jon. How could I have missed that. ;-)
Patrick O'Beirne said:
"Thank you Jon. How could I have missed that. ;-) "
You're fortunate to have Jon as the expert, but even without that input Google is your friend:
http://www.contextures.com/xlcomments02.html#Picture
http://www.dailydoseofexcel.com/archives/2005/04/19/funky-comments/
etc
Thanks for the blog on graphics!
I'm interested in more on analytics in Excel such as cluster analysis.
Chris said:
Guilty as charged, Patrick. I didn't even google it, because I was intrigued by this new technique.
del c said:
Jon, great idea, but I have a question.
If I had a thousand pictures, and a description of their location in an Excel database, could I, or someone more competent at VBA than I, write a macro to automate the insertion of comments into a thousand cells, each with its appropriate picture?
Chris said:
Del,
Inserting picture comments is actually quite easy--a reader has sent me a wonderful example of how to do it. Now, inserting a thousand comment pictures might not be too wise, but here's the nub of how you do it.
<pre>dim cmt as Comment
dim sFile as String
dim rng as Range</pre>
<pre>
set cmt = rng.AddComment
cmt.Text Text:=""
cmt.Shape.Fill.UserPicture sFile</pre>
sFile is the path to the image, rng is the range you want to add the comment to. If you send me your email, I'll send you a sample spreadsheet.
Chris
del c said:
Of course: it's just occurred to me that the actual information itself would be held in the comments, not a reference to a file held safely elsewhere. Nevermind :-)
I'll stick with hypertext references, which is what I used the last time I wanted to use an Excel spreadsheet as a database while also letting my audience easily consult a picture of what the line they were reading was describing.
Now, if your lightbox script technique works to grab an image held on the same medium, but outside the spreadsheet, thus avoiding bloating the spreadsheet file size horribly, that would be what I was thinking of, which would clearly be more elegant than using comment boxes.
Chris said:
Del, good news!
<blockquote>
Now, if your lightbox script technique works to grab an image held on the same medium, but outside the spreadsheet, thus avoiding bloating the spreadsheet file size horribly, that would be what I was thinking of, which would clearly be more elegant than using comment boxes.
</blockquote>
That is exactly what the lightbox script does.
Jon Peltier said:
Patrick -
"Google is your friend"
Google is one of my best friends, one of my favorite programming tools. But it takes a little imagination, first in thinking of Google; then in thinking "I don't think I can put an image into a comment, but maybe it's possible"; then in thinking of lateral solutions, like the image in a comment vs. the lightbox approach seen here, and the tradeoffs inherent in each (filesize, vba or not, etc.).
SkyZ said:
I am Sorry, I cannot Download the File :Excel Lightbox.xls
Could You Send Me a Mail as Attachment?
Thank You Very Much!
said:
Add a comment