﻿<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>Ed's Blog</title>
    <description>Let's see where this leads. This is about Pivot Tables, Charts, Excel 2007, and using these in Business.</description>
    <link>http://www.edferrero.com/Blog/tabid/106/BlogId/1/Default.aspx</link>
    <language>en-AU</language>
    <managingEditor>ed@edferrero.com</managingEditor>
    <webMaster>offers@edferrero.com</webMaster>
    <pubDate>Mon, 13 Oct 2008 19:36:42 GMT</pubDate>
    <lastBuildDate>Mon, 13 Oct 2008 19:36:42 GMT</lastBuildDate>
    <docs>http://backend.userland.com/rss</docs>
    <generator>Blog RSS Generator Version 3.4.0.39853</generator>
    <item>
      <title>Good book for Excel users wanting to learn VBA programming</title>
      <description>&lt;P&gt;Jim DeMarco's new book on Excel VBA is a great choice for users who have a good general knowledge of Excel and want to learn how to write code using class modules.&lt;/P&gt;
&lt;P&gt;This is a very good introduction to OOP in VBA. The book covers data import, XML, buiding user forms, charting, pivot tables, and Office integration.&lt;/P&gt;
&lt;P align=center&gt;&lt;IFRAME style="WIDTH: 120px; HEIGHT: 240px" marginWidth=0 marginHeight=0 src="http://rcm.amazon.com/e/cm?t=ferrerconsul-20&amp;o=1&amp;p=8&amp;l=as1&amp;asins=1590599578&amp;fc1=000000&amp;IS2=1&amp;lt1=_blank&amp;lc1=0000FF&amp;bc1=000000&amp;bg1=FFFFFF&amp;f=ifr" frameBorder=0 scrolling=no&gt;&lt;/IFRAME&gt;&lt;/P&gt;
&lt;P align=left&gt;Worth getting.&lt;/P&gt;</description>
      <link>http://www.edferrero.com/Blog/tabid/106/EntryID/18/Default.aspx</link>
      <author>ed@edferrero.com</author>
      <comments>http://www.edferrero.com/Blog/tabid/106/EntryID/18/Default.aspx#Comments</comments>
      <guid isPermaLink="true">http://www.edferrero.com/Default.aspx?tabid=106&amp;EntryID=18</guid>
      <pubDate>Thu, 15 May 2008 23:37:00 GMT</pubDate>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://www.edferrero.com/DesktopModules/Blog/Trackback.aspx?id=18</trackback:ping>
    </item>
    <item>
      <title>Dermot Balson's site is worth a look</title>
      <description>&lt;P&gt;This site deserves to be seen by a few more Excel users.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.edferrero.commhtml:{9D04D013-6AD9-4AB6-AC24-8124CF0F0E6D}mid://00000006/!x-usc:http://www.westnet.net.au/balson/ModellingExcel/"&gt;&lt;U&gt;&lt;FONT color=#0066cc&gt;http://www.westnet.net.au/balson/ModellingExcel/&lt;/FONT&gt;&lt;/U&gt;&lt;/A&gt;&lt;BR&gt;&lt;BR&gt;Dermot is based in Perth, Western Australia. Site has some neat examples. I especially like his pages on design patterns in Excel.&lt;/P&gt;
&lt;P&gt;Some very interesting code using encryption in Excel.&lt;/P&gt;</description>
      <link>http://www.edferrero.com/Blog/tabid/106/EntryID/17/Default.aspx</link>
      <author>ed@edferrero.com</author>
      <comments>http://www.edferrero.com/Blog/tabid/106/EntryID/17/Default.aspx#Comments</comments>
      <guid isPermaLink="true">http://www.edferrero.com/Default.aspx?tabid=106&amp;EntryID=17</guid>
      <pubDate>Thu, 15 May 2008 23:09:00 GMT</pubDate>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://www.edferrero.com/DesktopModules/Blog/Trackback.aspx?id=17</trackback:ping>
    </item>
    <item>
      <title>You can do anything with scatter charts!</title>
      <description>&lt;P&gt;Whilst preparing for Australia's first &lt;A href="http://www.block.net.au/devcon/index.htm" target=_blank&gt;Office DevCon&lt;/A&gt;, I revisited a few old scatter chart samples. After playing with these for a while, I decided that I really like scatter charts. If you remove the point markers, and join the series points with a plain line, you end up with a line chart over which you have a high degree of control. It's like having your own &lt;A href="http://www.howstuffworks.com/question317.htm" target=_blank&gt;etch-a-sketch&lt;/A&gt; machine in Excel - you can draw anything with a scatter chart.&lt;/P&gt;
&lt;P&gt;I started the DevCon presentation with this simple step-by-step example on how to build a chart with wariable width columns. You can get the whole sample &lt;A href="http://www.edferrero.com/Content/02%20Scatter%20Chart%20Variable%20Width%20Columns.xls"&gt;here&lt;/A&gt;, but it may be easier to follow the explanation in this blog post. First, draw a simple scatter chart, any series will do, but I picked a straight line.&lt;/P&gt;&lt;IMG alt="Scatter chart" src="/Content/Scatter01.png"&gt; 
&lt;P&gt;Then I clicked on a couple of points and dragged them around until I had something that started to look like a bar chart. Note that you cannot drag a point in Excel 2007. If you have that version, you will need to change the series values to achieve the same effect.&lt;/P&gt;&lt;IMG alt="Scatter chart" src="/Content/Scatter02.png"&gt; 
&lt;P&gt;After a while, it becomes easier to just edit the point values in the range that contains the data series. The chart is starting to look like a variable width column chart - actually a step chart&lt;/P&gt;&lt;IMG alt="Scatter chart" src="/Content/Scatter03.png"&gt; 
&lt;P&gt;Then format the chart series, remove the point markers and add vertical error bars of -100%. This results in a pile of boxes that looks very much like a column chart.&lt;/P&gt;&lt;IMG alt="Scatter chart" src="/Content/Scatter04.png"&gt; 
&lt;P&gt;Now we just need to enter some formulas in the worksheet that translate the values we wish to chart into variables that build the scatter chart series. The sample also shows how to build dynamic ranges so that any data we add will automatically be shown on the chart.&lt;/P&gt;&lt;IMG alt="Scatter chart" src="/Content/Scatter05.png"&gt; 
&lt;H2&gt;Box Plots&lt;/H2&gt;
&lt;P&gt;Perhaps not a very useful chart. This can show several entities that have a range of values over two dimensions on the one chart. &lt;A href="http://www.edferrero.com/Content/Scatter_BoxPlots.xls"&gt;Here is&lt;/A&gt; how to build this using a scatter chart.&lt;/P&gt;&lt;IMG alt="Box-Whisker chart" src="/Content/Box01.png"&gt; 
&lt;H2&gt;Box-Whisker Diagrams&lt;/H2&gt;
&lt;P&gt;Examples of box-whisker charts have been around for a while. Even I had a sample on my old web site a few years ago. &lt;BR&gt;&lt;A href="http://peltiertech.com/Excel/Charts/BoxWhiskerV.html" target=_blank&gt;http://peltiertech.com/Excel/Charts/BoxWhiskerV.html&lt;/A&gt; &lt;BR&gt;&lt;A href="http://www.mis.coventry.ac.uk/~nhunt/boxplot.htm" target=_blank&gt;http://www.mis.coventry.ac.uk/~nhunt/boxplot.htm&lt;/A&gt; &lt;BR&gt;&lt;A href="http://www.duncanwil.co.uk/boxplot.html" target=_blank&gt;http://www.duncanwil.co.uk/boxplot.html&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Most of these use column charts and combinations of up-down bars and high-low lines. Another way of drawing a &lt;A href="http://www.edferrero.com/Content/Scatter_Box_Whisker.xls"&gt;box-whisker diagram&lt;/A&gt; is with a scatter chart. The box-whisker diagram is shown together with the underlying data in this chart. It can also be shown without the data. The box-whisker diagram shows outliers as a disconnected line, the maximum and minimum extent of the data without outliers, and the first and third quartiles. It is used to get a quick indication of the spread of data.&lt;/P&gt;&lt;IMG alt="Box-Whisker chart" src="/Content/BoxWhisker01.png"&gt; 
&lt;H2&gt;Pyramid Charts&lt;/H2&gt;
&lt;P&gt;We have all seen food pyramids. &lt;A href="http://www.edferrero.com/Content/Scatter_Pyramid.xls"&gt;Here is my version&lt;/A&gt;. This is a chart where each tier in the pyramid has an area proportional to the value it represents. It is drawn using a different scatter chart series for each tier of the pyramid. You will need to look at the formulas carefully and use a little trigonometry to work out how it is built.&lt;/P&gt;&lt;IMG alt="Box-Whisker chart" src="/Content/Pyramid01.png"&gt; 
&lt;H2&gt;Waterfall Charts&lt;/H2&gt;
&lt;P&gt;I probably had the first sample of an Excel Waterfall (or cascade) chart on the web. It was done a while ago, and only worked for positive values. Some better examples have been built since then. &lt;BR&gt;&lt;A href="http://peltiertech.com/Excel/Charts/Waterfall.html" target=_blank&gt;http://peltiertech.com/Excel/Charts/Waterfall.html&lt;/A&gt; &lt;BR&gt;&lt;A href="http://www.tushar-mehta.com/excel/charts/waterfall/" target=_blank&gt;http://www.tushar-mehta.com/excel/charts/waterfall/&lt;/A&gt; &lt;BR&gt;&lt;A href="http://www.sccs.swarthmore.edu/users/06/adem/engin/excel/waterfall_chart/index.php" target=_blank&gt;http://www.sccs.swarthmore.edu/users/06/adem/engin/excel/waterfall_chart/index.php&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;All these samples use floating column charts to create waterfalls, as did my own early example. &lt;A href="http://www.edferrero.com/Content/Scatter_Waterfall.xls"&gt;Here is a waterfall chart&lt;/A&gt; that has been constructed using a scatter chart. Like all the samples in this post, it uses no VBA.&lt;/P&gt;&lt;IMG alt="Box-Whisker chart" src="/Content/Waterfall01.png"&gt; 
&lt;P&gt;I hope the next version of Excel will have some new chart types, meanwhile - you can draw anything with a scatter chart.&lt;/P&gt;</description>
      <link>http://www.edferrero.com/Blog/tabid/106/EntryID/16/Default.aspx</link>
      <author>ed@edferrero.com</author>
      <comments>http://www.edferrero.com/Blog/tabid/106/EntryID/16/Default.aspx#Comments</comments>
      <guid isPermaLink="true">http://www.edferrero.com/Default.aspx?tabid=106&amp;EntryID=16</guid>
      <pubDate>Wed, 14 Nov 2007 12:00:00 GMT</pubDate>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://www.edferrero.com/DesktopModules/Blog/Trackback.aspx?id=16</trackback:ping>
    </item>
    <item>
      <title>Office DevCon in Sydney November 3-4</title>
      <description>&lt;P&gt;MVP Graham Seach is organising an DevCon for Microsoft Office Developers and power users to be held at the MS Offices in Sydney over the weekend of November 3-4. &lt;a href="http://www.block.net.au/devcon/index.htm"&gt;www.block.net.au/devcon/index.htm&lt;/a&gt;&lt;/P&gt;
&lt;p&gt;If you are interested in making the best use of Office, I strongly urge you to attend. Check out the link for a list of speakers and topics&lt;/p&gt;
&lt;P&gt;I will certainly be there, and will present a couple of sessions.&lt;/P&gt;
&lt;P&gt;It is free to attend Office DevCon, but transport, accommodation and meal costs are at your own expense. Snacks and drinks will be provided at the end of Day 1, during the delegate networking event.&lt;/P&gt;</description>
      <link>http://www.edferrero.com/Blog/tabid/106/EntryID/15/Default.aspx</link>
      <author>ed@edferrero.com</author>
      <comments>http://www.edferrero.com/Blog/tabid/106/EntryID/15/Default.aspx#Comments</comments>
      <guid isPermaLink="true">http://www.edferrero.com/Default.aspx?tabid=106&amp;EntryID=15</guid>
      <pubDate>Fri, 31 Aug 2007 10:00:00 GMT</pubDate>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://www.edferrero.com/DesktopModules/Blog/Trackback.aspx?id=15</trackback:ping>
    </item>
    <item>
      <title>Interactive Balance Sheet</title>
      <description>&lt;P&gt;Today, I added a sample Balance Sheet built with a Pivot Table to the 'Excel Charts' section.&lt;/P&gt;
&lt;P&gt;Using Pivot Tables to build such accounting reports is nice because it automatically enables drill-down capabilities.&lt;/P&gt;
&lt;P&gt;The sample contains both the report and data in one workbook, but of course it makes more sense to link the Pivot Table to data that sits in a corporate database with read-only permissions for the majority of users. That way, only approved data is used in Excel reports.&lt;P&gt;</description>
      <link>http://www.edferrero.com/Blog/tabid/106/EntryID/14/Default.aspx</link>
      <author>ed@edferrero.com</author>
      <comments>http://www.edferrero.com/Blog/tabid/106/EntryID/14/Default.aspx#Comments</comments>
      <guid isPermaLink="true">http://www.edferrero.com/Default.aspx?tabid=106&amp;EntryID=14</guid>
      <pubDate>Fri, 25 May 2007 10:00:00 GMT</pubDate>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://www.edferrero.com/DesktopModules/Blog/Trackback.aspx?id=14</trackback:ping>
    </item>
    <item>
      <title>More on Excel 2007 Conditional Formats (and Excel 2003)</title>
      <description>&lt;P&gt;One of the nice things about Excel 2007 is the new conditional formatting options.&lt;/P&gt;
&lt;P&gt;Let’s look at this briefly. First, enter some data in Excel, like this;&lt;/P&gt;
&lt;P&gt;&lt;IMG height=319 alt="" src="/Portals/0/Blog/Files/1/10/CF1.png" width=246&gt;&lt;/P&gt;
&lt;P&gt;Then, select the data range A2:B14 and use the ‘Format as Table’ button on the Home ribbon. Make sure the ‘My Table has Headers’ option is checked and click OK. You should be able to get something like this after a bit of formatting.&lt;/P&gt;
&lt;P&gt;&lt;IMG height=324 alt="" src="/Portals/0/Blog/Files/1/10/CF2.png" width=248&gt;&lt;/P&gt;
&lt;P&gt;Now, select just the rainfall data in the range B3:B14, and click the “Conditional Formatting’ button on the Home ribbon. Select light blue data bars from the options. That’s it, you now have a quick and simple visualisation of the data.&lt;/P&gt;
&lt;P&gt;&lt;IMG height=325 alt="" src="/Portals/0/Blog/Files/1/10/CF3.png" width=244&gt;&lt;/P&gt;
&lt;P&gt;Can we simulate this in Excel 2003? The answer is yes, but we need a little bit of VBA code.&lt;/P&gt;
&lt;P&gt;The code is shown below. You need to enter this in a module in the VB Editor.&lt;/P&gt;&lt;FONT face=Courier New&gt;&lt;SPAN style="COLOR: #00007f"&gt;Option&lt;/SPAN&gt; &lt;SPAN style="COLOR: #00007f"&gt;Explicit&lt;/SPAN&gt;&lt;BR&gt;&lt;BR&gt;&lt;SPAN style="COLOR: #00007f"&gt;Sub&lt;/SPAN&gt; BuildBar()&lt;BR&gt;&lt;SPAN style="COLOR: #007f00"&gt;' Builds rectangle shapes in column C&lt;/SPAN&gt;&lt;BR&gt;&lt;BR&gt;&lt;SPAN style="COLOR: #007f00"&gt;' for this sample we assume that the range inpRange&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="COLOR: #007f00"&gt;' contains numeric data that we wish to chart&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="COLOR: #007f00"&gt;' the column next to the data should be empty&lt;/SPAN&gt;&lt;BR&gt;&lt;BR&gt;&lt;SPAN style="COLOR: #00007f"&gt;Dim&lt;/SPAN&gt; inpRange &lt;SPAN style="COLOR: #00007f"&gt;As&lt;/SPAN&gt; Range&lt;BR&gt;&lt;SPAN style="COLOR: #00007f"&gt;Dim&lt;/SPAN&gt; cell &lt;SPAN style="COLOR: #00007f"&gt;As&lt;/SPAN&gt; Range&lt;BR&gt;&lt;SPAN style="COLOR: #00007f"&gt;Dim&lt;/SPAN&gt; barLength &lt;SPAN style="COLOR: #00007f"&gt;As&lt;/SPAN&gt; &lt;SPAN style="COLOR: #00007f"&gt;Double&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="COLOR: #00007f"&gt;Dim&lt;/SPAN&gt; total &lt;SPAN style="COLOR: #00007f"&gt;As&lt;/SPAN&gt; &lt;SPAN style="COLOR: #00007f"&gt;Double&lt;/SPAN&gt;&lt;BR&gt;&lt;BR&gt;&lt;SPAN style="COLOR: #00007f"&gt;On&lt;/SPAN&gt; &lt;SPAN style="COLOR: #00007f"&gt;Error&lt;/SPAN&gt; &lt;SPAN style="COLOR: #00007f"&gt;Resume&lt;/SPAN&gt; &lt;SPAN style="COLOR: #00007f"&gt;Next&lt;/SPAN&gt;&lt;BR&gt;  &lt;SPAN style="COLOR: #00007f"&gt;Set&lt;/SPAN&gt; inpRange = Application.InputBox(prompt:="Enter Data Range" &amp; Chr(10) &amp; _&lt;BR&gt;            Chr(10) &amp; "CAUTION:" &amp; Chr(10) &amp; "Results will be shown in next Row or Column " _&lt;BR&gt;            &amp; Chr(10) &amp; "and will overwrite any existing data", _&lt;BR&gt;            Title:="Conditional Bars", Type:=8)&lt;BR&gt;&lt;SPAN style="COLOR: #00007f"&gt;On&lt;/SPAN&gt; &lt;SPAN style="COLOR: #00007f"&gt;Error&lt;/SPAN&gt; &lt;SPAN style="COLOR: #00007f"&gt;GoTo&lt;/SPAN&gt; 0&lt;BR&gt;&lt;BR&gt;  &lt;SPAN style="COLOR: #00007f"&gt;If&lt;/SPAN&gt; inpRange &lt;SPAN style="COLOR: #00007f"&gt;Is&lt;/SPAN&gt; &lt;SPAN style="COLOR: #00007f"&gt;Nothing&lt;/SPAN&gt; &lt;SPAN style="COLOR: #00007f"&gt;Then&lt;/SPAN&gt; &lt;SPAN style="COLOR: #00007f"&gt;Exit&lt;/SPAN&gt; &lt;SPAN style="COLOR: #00007f"&gt;Sub&lt;/SPAN&gt;&lt;BR&gt;&lt;BR&gt;&lt;SPAN style="COLOR: #007f00"&gt;' clean up any previously built rectangles&lt;/SPAN&gt;&lt;BR&gt;  CleanUp&lt;BR&gt;&lt;BR&gt;  total = Application.WorksheetFunction.Max(inpRange)&lt;BR&gt;&lt;BR&gt;  &lt;SPAN style="COLOR: #00007f"&gt;For&lt;/SPAN&gt; &lt;SPAN style="COLOR: #00007f"&gt;Each&lt;/SPAN&gt; cell &lt;SPAN style="COLOR: #00007f"&gt;In&lt;/SPAN&gt; inpRange.Columns(1).Cells&lt;BR&gt;    barLength = cell.Value / total&lt;BR&gt;    &lt;SPAN style="COLOR: #00007f"&gt;Call&lt;/SPAN&gt; AddRectangle(cell.Offset(0, 1), barLength)&lt;BR&gt;  &lt;SPAN style="COLOR: #00007f"&gt;Next&lt;/SPAN&gt; cell&lt;BR&gt;&lt;BR&gt;&lt;SPAN style="COLOR: #00007f"&gt;End&lt;/SPAN&gt; &lt;SPAN style="COLOR: #00007f"&gt;Sub&lt;/SPAN&gt;&lt;BR&gt;&lt;BR&gt;&lt;SPAN style="COLOR: #00007f"&gt;Sub&lt;/SPAN&gt; AddRectangle(dest &lt;SPAN style="COLOR: #00007f"&gt;As&lt;/SPAN&gt; Range, barLength &lt;SPAN style="COLOR: #00007f"&gt;As&lt;/SPAN&gt; &lt;SPAN style="COLOR: #00007f"&gt;Double&lt;/SPAN&gt;)&lt;BR&gt;&lt;SPAN style="COLOR: #007f00"&gt;' Adds a rectangle shape to fill the specified cell&lt;/SPAN&gt;&lt;BR&gt;&lt;BR&gt;&lt;SPAN style="COLOR: #00007f"&gt;Dim&lt;/SPAN&gt; cL, cT, cW, cH &lt;SPAN style="COLOR: #00007f"&gt;As&lt;/SPAN&gt; &lt;SPAN style="COLOR: #00007f"&gt;Single&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="COLOR: #00007f"&gt;Dim&lt;/SPAN&gt; shp &lt;SPAN style="COLOR: #00007f"&gt;As&lt;/SPAN&gt; Shape&lt;BR&gt;&lt;BR&gt;&lt;SPAN style="COLOR: #00007f"&gt;With&lt;/SPAN&gt; dest&lt;BR&gt;  cL = .Left&lt;BR&gt;  cT = .Top&lt;BR&gt;  cW = .Width&lt;BR&gt;  cH = .Height&lt;BR&gt;&lt;SPAN style="COLOR: #00007f"&gt;End&lt;/SPAN&gt; &lt;SPAN style="COLOR: #00007f"&gt;With&lt;/SPAN&gt;&lt;BR&gt;&lt;BR&gt;&lt;SPAN style="COLOR: #00007f"&gt;Set&lt;/SPAN&gt; shp = ActiveSheet.Shapes.AddShape(msoShapeRectangle, cL, cT, cW, cH)&lt;BR&gt;&lt;BR&gt;&lt;SPAN style="COLOR: #00007f"&gt;With&lt;/SPAN&gt; shp&lt;BR&gt;  &lt;SPAN style="COLOR: #007f00"&gt;' name the shapes so that we can keep track of them&lt;/SPAN&gt;&lt;BR&gt;  .Name = "fcRect" &amp; dest.Address&lt;BR&gt;  &lt;SPAN style="COLOR: #007f00"&gt;' set a fill colour&lt;/SPAN&gt;&lt;BR&gt;  &lt;SPAN style="COLOR: #00007f"&gt;With&lt;/SPAN&gt; .Fill&lt;BR&gt;    .ForeColor.SchemeColor = 10&lt;BR&gt;    .BackColor.SchemeColor = 51&lt;BR&gt;    .TwoColorGradient msoGradientVertical, 1&lt;BR&gt;  &lt;SPAN style="COLOR: #00007f"&gt;End&lt;/SPAN&gt; &lt;SPAN style="COLOR: #00007f"&gt;With&lt;/SPAN&gt;&lt;BR&gt;  &lt;SPAN style="COLOR: #007f00"&gt;' size them to be proportional to barLength&lt;/SPAN&gt;&lt;BR&gt;  .ScaleWidth barLength, msoFalse, msoScaleFromTopLeft&lt;BR&gt;&lt;SPAN style="COLOR: #00007f"&gt;End&lt;/SPAN&gt; &lt;SPAN style="COLOR: #00007f"&gt;With&lt;/SPAN&gt;&lt;BR&gt;&lt;BR&gt;&lt;SPAN style="COLOR: #00007f"&gt;End&lt;/SPAN&gt; &lt;SPAN style="COLOR: #00007f"&gt;Sub&lt;/SPAN&gt;&lt;BR&gt;&lt;BR&gt;&lt;SPAN style="COLOR: #00007f"&gt;Sub&lt;/SPAN&gt; CleanUp()&lt;BR&gt;&lt;SPAN style="COLOR: #00007f"&gt;Dim&lt;/SPAN&gt; shp &lt;SPAN style="COLOR: #00007f"&gt;As&lt;/SPAN&gt; Shape&lt;BR&gt;  &lt;SPAN style="COLOR: #00007f"&gt;For&lt;/SPAN&gt; &lt;SPAN style="COLOR: #00007f"&gt;Each&lt;/SPAN&gt; shp &lt;SPAN style="COLOR: #00007f"&gt;In&lt;/SPAN&gt; ActiveSheet.Shapes&lt;BR&gt;    &lt;SPAN style="COLOR: #00007f"&gt;If&lt;/SPAN&gt; Left(shp.Name, 6) = "fcRect" &lt;SPAN style="COLOR: #00007f"&gt;Then&lt;/SPAN&gt;&lt;BR&gt;      shp.Delete&lt;BR&gt;    &lt;SPAN style="COLOR: #00007f"&gt;End&lt;/SPAN&gt; &lt;SPAN style="COLOR: #00007f"&gt;If&lt;/SPAN&gt;&lt;BR&gt;  &lt;SPAN style="COLOR: #00007f"&gt;Next&lt;/SPAN&gt; shp&lt;BR&gt;&lt;SPAN style="COLOR: #00007f"&gt;End&lt;/SPAN&gt; &lt;SPAN style="COLOR: #00007f"&gt;Sub&lt;/SPAN&gt;&lt;/FONT&gt; 
&lt;P&gt;The ‘BuildBar’ routine calls an input box to get the data range from the user, then it calls the ‘CleanUp’ routine to delete any shapes that have a name starting with “fcRect”. It then draws a series of rectangle shapes proportional to the data in the next column. You can add a button to the worksheet to call the ‘BuildBar’ routine if you like. When the routine is run, you will be asked to select the data.&lt;/P&gt;
&lt;P&gt;&lt;IMG style="WIDTH: 688px; HEIGHT: 334px" height=250 alt="" src="/Portals/0/Blog/Files/1/10/CF5.png" width=500&gt;&lt;/P&gt;
&lt;P&gt;Then clicking OK will build conditional bars in the next column. As shown.&lt;/P&gt;
&lt;P&gt;&lt;IMG height=300 alt="" src="/Portals/0/Blog/Files/1/10/CF6.png" width=465&gt;&lt;/P&gt;
&lt;P&gt;Enjoy&lt;/P&gt;</description>
      <link>http://www.edferrero.com/Blog/tabid/106/EntryID/10/Default.aspx</link>
      <author>ed@edferrero.com</author>
      <comments>http://www.edferrero.com/Blog/tabid/106/EntryID/10/Default.aspx#Comments</comments>
      <guid isPermaLink="true">http://www.edferrero.com/Default.aspx?tabid=106&amp;EntryID=10</guid>
      <pubDate>Thu, 17 May 2007 10:00:00 GMT</pubDate>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://www.edferrero.com/DesktopModules/Blog/Trackback.aspx?id=10</trackback:ping>
    </item>
    <item>
      <title>Excel 2007 Format Conditions</title>
      <description>&lt;P&gt;I really like the enhanced conditional formatting in Excel 2007. Today I found out that the FormatConditions property in VBA behaves slightly differently in Excel 2007 than it used to in 2003.&lt;/P&gt;
&lt;P&gt;In particular, if the format condition is based on a cell value, then the Formula1 property of the FormatContition object in Excel 2003 returns a numeric value. i.e. if the conditional format is 'Cell Value Is' greater than 100, then the Formula1 property will eturn the number 100 in Excel 2003. In Excel 2007 this will return a string - "=100".&lt;/P&gt;
&lt;P&gt;This presents a problem when writing code that works for both Excel 2003 and 2007. The short sample below shows how to test the Formula1 property so that it works in both versions of Excel.&lt;/P&gt;
&lt;P&gt;Sub TestFormatCondition()&lt;BR&gt;Dim rng As Range&lt;BR&gt;Dim valCond1 As Double&lt;/P&gt;
&lt;P&gt;Set rng = Worksheets(1).Range("A1")&lt;/P&gt;
&lt;P&gt;With rng.FormatConditions(1)&lt;BR&gt;  ' check if formula condition is numeric (Excel 2007 uses string)&lt;BR&gt;  If IsNumeric(.Formula1) Then&lt;BR&gt;    valCond1 = .Formula1&lt;BR&gt;  ElseIf IsNumeric(Mid(.Formula1, 2, 1)) Then&lt;BR&gt;    valCond1 = CDbl(Right(.Formula1, Len(.Formula1) - 1))&lt;BR&gt;  Else&lt;BR&gt;    Debug.Print "Condition is Formula"&lt;BR&gt;  End If&lt;BR&gt;End With&lt;/P&gt;
&lt;P&gt;Debug.Print valCond1&lt;/P&gt;
&lt;P&gt;End Sub&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;</description>
      <link>http://www.edferrero.com/Blog/tabid/106/EntryID/8/Default.aspx</link>
      <author>ed@edferrero.com</author>
      <comments>http://www.edferrero.com/Blog/tabid/106/EntryID/8/Default.aspx#Comments</comments>
      <guid isPermaLink="true">http://www.edferrero.com/Default.aspx?tabid=106&amp;EntryID=8</guid>
      <pubDate>Tue, 15 May 2007 10:00:00 GMT</pubDate>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://www.edferrero.com/DesktopModules/Blog/Trackback.aspx?id=8</trackback:ping>
    </item>
    <item>
      <title>Need a good screen capture tool? SnagIt</title>
      <description>&lt;p&gt;I have been using SnagIt by &lt;a href="http://www.techsmith.com/snagit.asp" target="_blank"&gt;TechSmith&lt;/a&gt; and can thoroughly recommend the product.&lt;/p&gt;

&lt;p&gt;Its fast, and it works. I find that the built-in graphics editor is great for cropping, resizing and colour balance, and allows me to add text and small graphics to an image. This is all I really want in a graphics editor.&lt;/p&gt;

&lt;p&gt;If you need to capture images from your screen and incorporate them in documents, get it.&lt;/p&gt;</description>
      <link>http://www.edferrero.com/Blog/tabid/106/EntryID/7/Default.aspx</link>
      <author>ed@edferrero.com</author>
      <comments>http://www.edferrero.com/Blog/tabid/106/EntryID/7/Default.aspx#Comments</comments>
      <guid isPermaLink="true">http://www.edferrero.com/Default.aspx?tabid=106&amp;EntryID=7</guid>
      <pubDate>Thu, 10 May 2007 16:29:00 GMT</pubDate>
      <slash:comments>1</slash:comments>
      <trackback:ping>http://www.edferrero.com/DesktopModules/Blog/Trackback.aspx?id=7</trackback:ping>
    </item>
    <item>
      <title>Oops, this time it was my fault entirely</title>
      <description>&lt;P&gt;I tried to edit the back-end database for this site directly. Big mistake - I lost connection half way through copying a table and ended up corrupting quite a few things. Back up and running now. I won't try that again.&lt;/P&gt;
&lt;P&gt;Back-up the database.&lt;br/&gt;
Back-up the database.&lt;br/&gt;
Back-up the database.&lt;br/&gt;
Back-up the database.&lt;br/&gt;
Back-up the database.&lt;br/&gt;
Back-up the database.&lt;br/&gt;
Back-up the database.&lt;br/&gt;
Back-up the database.&lt;br/&gt;
&lt;/P&gt;
</description>
      <link>http://www.edferrero.com/Blog/tabid/106/EntryID/6/Default.aspx</link>
      <author>ed@edferrero.com</author>
      <comments>http://www.edferrero.com/Blog/tabid/106/EntryID/6/Default.aspx#Comments</comments>
      <guid isPermaLink="true">http://www.edferrero.com/Default.aspx?tabid=106&amp;EntryID=6</guid>
      <pubDate>Thu, 10 May 2007 16:19:00 GMT</pubDate>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://www.edferrero.com/DesktopModules/Blog/Trackback.aspx?id=6</trackback:ping>
    </item>
    <item>
      <title>Two new books for 2007</title>
      <description>&lt;P&gt;I have had the good fortune to be Technical Editor for two books just published by Wiley. I recommend both of them.&lt;/P&gt;
&lt;P&gt;The first is 'Excel 2007 PivotTables &amp; PivotCharts' by Peter G Aitken. This is a good introduction to Pivot Tables for those who have not used them before. However, it is equally suited to power users who wish to increase their knowledge of Pivot Tables and how to use them more effectively.&lt;/P&gt;
&lt;P align=center&gt;
&lt;iframe src="http://rcm.amazon.com/e/cm?t=ferrerconsul-20&amp;o=1&amp;p=8&amp;l=as1&amp;asins=0470104872&amp;fc1=000000&amp;IS2=1&amp;lt1=_blank&amp;lc1=0000FF&amp;bc1=000000&amp;bg1=FFFFFF&amp;f=ifr" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"&gt;&lt;/iframe&gt;
&lt;/P&gt;
&lt;P&gt;The second is 'Excel &amp; Access Integration' by Michael Alexander and Geoffrey Clark. This is aimed at the power user who wishes to start using Access and Excel together to leverage the unique capabilities of both these programs to build powerful office applications.&lt;/P&gt;
&lt;P align=center&gt;
&lt;iframe src="http://rcm.amazon.com/e/cm?t=ferrerconsul-20&amp;o=1&amp;p=8&amp;l=as1&amp;asins=0470104880&amp;fc1=000000&amp;IS2=1&amp;lt1=_blank&amp;lc1=0000FF&amp;bc1=000000&amp;bg1=FFFFFF&amp;f=ifr" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"&gt;&lt;/iframe&gt;
&lt;/P&gt;</description>
      <link>http://www.edferrero.com/Blog/tabid/106/EntryID/5/Default.aspx</link>
      <author>ed@edferrero.com</author>
      <comments>http://www.edferrero.com/Blog/tabid/106/EntryID/5/Default.aspx#Comments</comments>
      <guid isPermaLink="true">http://www.edferrero.com/Default.aspx?tabid=106&amp;EntryID=5</guid>
      <pubDate>Tue, 01 May 2007 16:38:00 GMT</pubDate>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://www.edferrero.com/DesktopModules/Blog/Trackback.aspx?id=5</trackback:ping>
    </item>
  </channel>
</rss>