<?xml version="1.0" encoding="utf-8"?> 
<rss version="2.0"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
    xmlns:admin="http://webns.net/mvcb/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:content="http://purl.org/rss/1.0/modules/content/"
    xmlns:atom="http://www.w3.org/2005/Atom">

    <channel>
    
    <title>cellMatrix.net</title>
    <link>http://www.cellmatrix.net/index.php/site/index/</link>
    <description>Formulas, Charts, and Models Created with Microsoft Excel.</description>
    <dc:language>en</dc:language>
    <dc:creator>jfm</dc:creator>
    <dc:rights>Copyright 2009</dc:rights>
    <dc:date>2009-06-18T05:00:48-07:00</dc:date>
    <admin:generatorAgent rdf:resource="http://expressionengine.com/" />
    <atom:link href="http://www.cellmatrix.net/index.php/site/rss_2.0/" rel="self" type="application/rss+xml" />
    

    <item>
      <title>My Experience with SOX</title>
      <link>http://www.cellmatrix.net/index.php/site/my_experience_with_sox/</link>
      <guid>http://www.cellmatrix.net/index.php/site/my_experience_with_sox/#When:05:00:48Z</guid>
      <description>
            <![CDATA[<p>The website <a href="http://www.accountingweb.co.uk/cgi-bin/item.cgi?id=199516" title="AccountingWeb">AccountingWeb</a> recently ran an article titled "Understanding Spreadsheet Risks".  The article notes that the "US Sarbanes-Oxley Act and related regulations increased the level of scrutiny over the way spreadsheets are used and controlled in financial reporting and other critical business functions."</p>

<p>The company that I work for has to comply with Sarbanes-Oxley.  Below is a brief summary of what must be done to comply.</p>

<p><b>Workbook Inventory</b></p>

<p>A central database will be maintained for any spreadsheet that serves as a source for a journal entry.  An individual record within that database is kept for each spreadsheet.  That record must contain:</p>

<ul>
<li>The name of the workbook file.</li>
<li>A control number that is assigned to that workbook.</li>
<li>The author of the workbook.</li>
<li>The purpose of the workbook.</li>
<li>Who depends on the workbook.</li>
<li>The site location where the workbook resides.</li>
<li>The directory location of the workbook.</li>
<li>A log of all passwords tied to the workbook.</li>
</ul>

<p><b>Workbook Security</b></p>

<ul>
<li>Workbooks and worksheets should be password protected.</li>
<li>Cells containing static values must be locked.</li>
<li>As people change positions, access rights should be updated.</li>
</ul>

<p><b>Change Management</b></p>

<ul>
<li>Changes to workbooks must be approved, documented, and managed to include previous and revised formulas, assumptions, and reasons for making the change.</li>
<li>A log of all changes must be recorded in separate worksheet.</li>
<li>Changes require review and approval by at least two managers.</li>
<li>Changes should be communicated to all of those that may be impacted.</li>
</ul>

<p><b>Archiving</b></p>

<ul>
<li>An archived version of the original file must be kept before saving any changes.</li>
<li>Archived versions must be kept for a period of time directed in a separate retention policy.</li>
</ul>

<p>All of this courtesy of Enron, WorldCom, Tyco, and others.  Thoughts?</p> 



 




            <hr /> 
            <p>Posted on: June 17, 2009  |
            Filed Under: <a href="http://www.cellmatrix.net/index.php/site/category/around_the_web/">Around the Web</a> | 
            <a href="http://www.cellmatrix.net/index.php/site/comments/my_experience_with_sox/">Comments:</a> (0)</p> 
            ]]>
      </description>
      <dc:subject>Around the Web</dc:subject>
      <dc:date>2009-06-18T05:00:48-07:00</dc:date>
    </item>

    <item>
      <title>Dual&#45;Series Clustered Bar Chart</title>
      <link>http://www.cellmatrix.net/index.php/site/dual-series_clustered_bar_chart/</link>
      <guid>http://www.cellmatrix.net/index.php/site/dual-series_clustered_bar_chart/#When:11:30:25Z</guid>
      <description>
            <![CDATA[<p>A standard in the Healthcare industry is a dual-series clustered bar chart that compares a series of key statistics on a month and year-to-date basis.  In Excel, the data source for this chart would be set up similar to below.</p> 

<div class="ctr">
<img src="http://www.cellmatrix.net/images/uploads/2009060901.gif" style="border: 0;" alt="image" width="340" height="169" />
</div>

<p>Unfortunately it can be a frustrating experience if you use the Chart Wizard to set this chart up for the first time.  As can be seen in the image below  the category axis labels, bars, and legend data all appear to be backwards.</p>  

<div class="ctr">
<img src="http://www.cellmatrix.net/images/uploads/2009060902.GIF" style="border: 0;" alt="image" width="448" height="272" />
</div>

<p>The chart can be cleaned up in just a few easy steps.  The frustrating part is that if you're not very familiar with Excel, figuring out these steps can take a lot of time.  The steps are:</p>

<ul>
<li>Category Axis - Format Axis - Patterns - Tick Mark Labels = Low</li>
<li>Category Axis - Format Axis - Scale = Categories in Reverse Order</li>
<li>Value Axis - Format Axis - Patterns - Tick Mark Labels = None</li>
</ul>

<p>A simple macro will accomplish the same thing:</p>

<p>
<pre>
Sub SetUpChart()

    Application.ScreenUpdating = False
    
    With ActiveChart.Axes(xlCategory)
        .ReversePlotOrder = True
        .TickLabelPosition = xlLow
        .MajorTickMark = xlNone
    End With

    With ActiveChart.Axes(xlValue)
        .MinimumScale = -0.2
        .MaximumScale = 0.2
        .MajorTickMark = xlNone
        .TickLabelPosition = xlNone
        .Border.LineStyle = xlNone
    End With

    ActiveChart.Axes(xlValue).HasMajorGridlines = False
    ActiveChart.Axes(xlValue).HasMinorGridlines = False
    
    ActiveChart.SeriesCollection(1).ApplyDataLabels
    ActiveChart.SeriesCollection(2).ApplyDataLabels

    ActiveChart.PlotArea.Border.LineStyle = xlNone
    ActiveChart.PlotArea.Interior.ColorIndex = xlNone
    
    ActiveChart.Legend.Position = xlBottom

    ActiveChart.Deselect

End Sub
</pre>

<p>The final chart looks like the one below.  The Y-axis labels now flow from the top down, the monthly bars appear on top of the YTD bars, and the month appears before YTD in the legend.  At this point only the formatting needs further work.</p>  

<div class="ctr">
<img src="http://www.cellmatrix.net/images/uploads/2009060903.GIF" style="border: 0;" alt="image" width="449" height="273" />
</div>

<br/>

            <hr /> 
            <p>Posted on: June 11, 2009  |
            Filed Under: <a href="http://www.cellmatrix.net/index.php/site/category/Charts/">Charts</a> | 
            <a href="http://www.cellmatrix.net/index.php/site/comments/dual-series_clustered_bar_chart/">Comments:</a> (0)</p> 
            ]]>
      </description>
      <dc:subject>Charts</dc:subject>
      <dc:date>2009-06-11T11:30:25-07:00</dc:date>
    </item>

    <item>
      <title>Scroll to Cell A1</title>
      <link>http://www.cellmatrix.net/index.php/site/scroll_to_cell_a1/</link>
      <guid>http://www.cellmatrix.net/index.php/site/scroll_to_cell_a1/#When:13:36:01Z</guid>
      <description>
            <![CDATA[<p>It's been almost four months since my last post.  The reasons why . . .</p> 

<ul>
<li>Work has been extremely busy.  It seems that in an economic downturn my job seems to get busier rather than slow down.  As the business goes south there's an increased need for the financial analysis that supports the decisions that management makes.</li>
<li>Preparing for a professional exam.  Studying and finally taking the test takes up a lot of time.</li>
<li>A lack of fresh ideas.  That's probably the real reason.</li>       
</ul>

<p>That being said, the VBA Express site <a href="http://www.vbaexpress.com/kb/getarticle.php?kb_id=485" title="posted a simple macro">posted a simple macro</a> that allows the user to view each sheet starting at the top-left cell.  A variation of that macro is shown below.  In my opinion, it's more professional to distribute a workbook to others with the active cell for each sheet at "A1".  This macro allows you to quickly and efficiently set up your workbook to do so before sending it out.</p>

<pre>
Sub GoToCellA1()

    Dim Sheet As Worksheet
    Dim CurrentSheet As String
    
    CurrentSheet = ActiveSheet.Name

    Application.ScreenUpdating = False
    
    For Each Sheet In Worksheets

        Application.Goto Sheet.Range("A1"), scroll:=True

    Next

Sheets(CurrentSheet).Activate

End Sub
</pre>
            <hr /> 
            <p>Posted on: May 30, 2009  |
            Filed Under: <a href="http://www.cellmatrix.net/index.php/site/category/VBA/">VBA</a> | 
            <a href="http://www.cellmatrix.net/index.php/site/comments/scroll_to_cell_a1/">Comments:</a> (2)</p> 
            ]]>
      </description>
      <dc:subject>VBA</dc:subject>
      <dc:date>2009-05-30T13:36:01-07:00</dc:date>
    </item>

    <item>
      <title>VBA to Change Absolute and Relative Cell References</title>
      <link>http://www.cellmatrix.net/index.php/site/vba_to_change_absolute_and_relative_cell_references/</link>
      <guid>http://www.cellmatrix.net/index.php/site/vba_to_change_absolute_and_relative_cell_references/#When:06:04:51Z</guid>
      <description>
            <![CDATA[<p>In response to a newsgroup question, I recently referenced a VBA procedure at <a href="http://www.ozgrid.com/VBA/formula-ref-change.htm" title="Ozgrid.com">Ozgrid.com</a> that shows how to change relative and absolute row - column references.  I thought I might document some slightly simplified versions for my own use:</p>

<p>To convert all formulas within a stated range to absolute references:</p>

<pre>
Sub All_Absolute()
    Dim Rng As Range
    Set Rng = Range("A1:A5")
    Rng.SpecialCells(xlCellTypeFormulas) = Application.ConvertFormula(Rng.Formula, _
    FromReferenceStyle:=xlA1, ToReferenceStyle:=xlA1, ToAbsolute:=xlAbsolute)
End Sub
</pre>

<p>To convert all formulas within a stated range to relative references:</p>

<pre>
Sub All_Relative()
    Dim Rng As Range
    Set Rng = Range("A1:A5")
    Rng.SpecialCells(xlCellTypeFormulas) = Application.ConvertFormula(Rng.Formula, _
    FromReferenceStyle:=xlA1, ToReferenceStyle:=xlA1, ToAbsolute:=xlRelative)
End Sub
</pre>

<p>To convert all formulas within a stated range to relative row / absolute column references:</p>

<pre>
Sub Relative_Row_Absolute_Column()
    Dim Rng As Range
    Set Rng = Range("A1:A5")
    Rng.SpecialCells(xlCellTypeFormulas) = Application.ConvertFormula(Rng.Formula, _
    FromReferenceStyle:=xlA1, ToReferenceStyle:=xlA1, ToAbsolute:=xlRelRowAbsColumn)
End Sub
</pre>

<p>To convert all formulas within a stated range to relative column / absolute row references:</p>

<pre>
Sub Relative_Column_Absolute_Row()
    Dim Rng As Range
    Set Rng = Range("A1:A5")
    Rng.SpecialCells(xlCellTypeFormulas) = Application.ConvertFormula(Rng.Formula, _
    FromReferenceStyle:=xlA1, ToReferenceStyle:=xlA1, ToAbsolute:=xlAbsRowRelColumn)
End Sub
</pre>


            <hr /> 
            <p>Posted on: January 26, 2009  |
            Filed Under: <a href="http://www.cellmatrix.net/index.php/site/category/VBA/">VBA</a> | 
            <a href="http://www.cellmatrix.net/index.php/site/comments/vba_to_change_absolute_and_relative_cell_references/">Comments:</a> (0)</p> 
            ]]>
      </description>
      <dc:subject>VBA</dc:subject>
      <dc:date>2009-01-27T06:04:51-07:00</dc:date>
    </item>

    <item>
      <title>Chart in Userform with Listbox Control</title>
      <link>http://www.cellmatrix.net/index.php/site/chart_in_userform_with_listbox_control/</link>
      <guid>http://www.cellmatrix.net/index.php/site/chart_in_userform_with_listbox_control/#When:10:45:25Z</guid>
      <description>
            <![CDATA[<p>In <a href="http://spreadsheetpage.com/index.php/tip/displaying_a_chart_in_a_userform/" title="Displaying a Chart in a Userform">Displaying a Chart in a Userform</a>, <a href="http://spreadsheetpage.com/" title="John Walkenbach">John Walkenbach</a> describes how to use VBA to save an embedded chart as a GIF file and then load that file into a userform.  The userform contains controls that allow you to scroll forward or backward through all of the charts that are available.</p>

<p>I recently built a model where I needed to to take this example another step further by building in functionality to allow the user to:</p>

<ul>
<li>See a list of the names of all charts available to be displayed.</li>
<li>Allow the user to pick what chart he or she wanted to see based on that list.</li>
</ul>

<p>To do so, the use of a listbox in a userform seemed like the ideal setup to use.</p>

<p>As an example, start with a spreadsheet containing four embedded charts:</p>

<img src="http://www.cellmatrix.net/images/uploads/2009011801.gif" style="border: 0;" alt="image" width="558" height="469" />

<p>The charts are located on a sheet named "Charts".  All of the charts are aligned to the worksheet grid and sized exactly the same.  To align and size the charts, I used the following macro:</p>

<pre>
Sub AlignCharts()
    Application.ScreenUpdating = False
    Dim ChtObj As ChartObject
    For Each ChtObj In Sheets("Charts").ChartObjects
        ChtObj.Top = ChtObj.TopLeftCell.Top
        ChtObj.Left = ChtObj.TopLeftCell.Left
        ChtObj.Height = 126
        ChtObj.Width = 192
    Next ChtObj
End Sub
</pre>  

<p>A name is applied to each chart.  Naming the chart is the key to allowing you to control the order in which the chart appears in the listbox.  You can use any name that you want.  In this example the first chart is named "Cht01", the second "Cht02", the third "Cht03", and the fourth "Cht04".  To name each chart, I used the following macro:</p>

<pre>
Sub NameChart()
    ActiveChart.Parent.Name = "ColumnCht"
End Sub
</pre>

<p>Note that to run the "NameChart" macro, you must activate the chart (click on it) first and then run the macro.</p>

<p>At this point it's time to build the userform.  As in the <a href="http://spreadsheetpage.com/index.php/tip/displaying_a_chart_in_a_userform/" title="Spreadsheet Page example">Spreadsheet Page example</a>, the userform contains an image control and buttons that allow the user to scroll forward or backward through the charts.  I've added the additional listbox control:</p>

<div class="ctr">
<img src="http://www.cellmatrix.net/images/uploads/2009011802.gif" style="border: 0;" alt="image" width="266" height="337" />
</div>

<p>When you click on the "Chart Userform" button which is embedded in the "Charts" sheet, the userform is shown via the following code.  Note that the button embedded in the "Charts" sheet is named "CB1", the userform is named "userform1", and the listbox is named "listbox1".  The code is placed in the "Charts" sheet and the charts are ordered high-to-low in any order that you want the user to see.</p>

<pre>
Private Sub CB1_Click()
'   Clear the RowSource property
    UserForm1.ListBox1.RowSource = ""

'   Add items to ListBox
    UserForm1.ListBox1.AddItem "Column Chart"
    UserForm1.ListBox1.AddItem "Line Chart"
    UserForm1.ListBox1.AddItem "Area Chart"
    UserForm1.ListBox1.AddItem "Bar Chart"

    UserForm1.Show vbModeless
End Sub
</pre>

<p>After the userform is shown via the code above, it is then initialized to show the first chart in the image control via the code below.  A textbox (named "TB1") located above the image control contains the chart title.</p> 

<pre>
Public Rng As Range
Public Cht As String

Private Sub UserForm_Initialize()
    TB1 = "Column Chart"
    Cht = "Cht01"
    Call UpdateChart
End Sub

Private Sub UpdateChart()

    Set CurrentChart = Sheets("Charts").ChartObjects(Cht).Chart

    '   Saves the chart as GIF file
    Fname = ThisWorkbook.Path &amp; Application.PathSeparator &amp; "temp.gif"
    CurrentChart.Export FileName:=Fname, FilterName:="GIF"

    '   Shows the chart in the image control
    Image1.Picture = LoadPicture(Fname)

End Sub
</pre>

<p>Finally, a listbox click event allows the charts to appear in the image control when the listbox is clicked.</p>

<pre>
Private Sub Listbox1_Click()
    If ListBox1.ListIndex = 0 Then
        TB1 = "Column Chart"
        Cht = "Cht01"
    ElseIf ListBox1.ListIndex = 1 Then
        TB1 = "Line Chart"
        Cht = "Cht02"
    ElseIf ListBox1.ListIndex = 2 Then
        TB1 = "Area Chart"
        Cht = "Cht03"
    ElseIf ListBox1.ListIndex = 3 Then
        TB1 = "Bar Chart"
        Cht = "Cht04"
    End If
    Call UpdateChart
End Sub
</pre>

<p>You can download the example file via the link below:</p>

<div class="download"><a href="http://www.cellmatrix.net/webfiles/ListboxChart_setup.exe">Download</a></div>

<p>Note: the technique of loading a chart into a userform is credited to John Walkenbach.  His example of <a href="http://spreadsheetpage.com/index.php/tip/displaying_a_chart_in_a_userform/" title="Displaying a Chart in a Userform">Displaying a Chart in a Userform</a> can be found at <a href="http://spreadsheetpage.com/" title="The Spreadsheet Page">The Spreadsheet Page</a>.</p>



            <hr /> 
            <p>Posted on: January 20, 2009  |
            Filed Under: <a href="http://www.cellmatrix.net/index.php/site/category/Charts/">Charts</a> | 
            <a href="http://www.cellmatrix.net/index.php/site/comments/chart_in_userform_with_listbox_control/">Comments:</a> (0)</p> 
            ]]>
      </description>
      <dc:subject>Charts</dc:subject>
      <dc:date>2009-01-20T10:45:25-07:00</dc:date>
    </item>

    <item>
      <title>Just Plain Data Analysis Companion Site and Excel 2007</title>
      <link>http://www.cellmatrix.net/index.php/site/just_plain_data_analysis_companion_site_and_excel_2007/</link>
      <guid>http://www.cellmatrix.net/index.php/site/just_plain_data_analysis_companion_site_and_excel_2007/#When:11:27:37Z</guid>
      <description>
            <![CDATA[<p>Gary Klass is a member of the Department of Politics and Government at Illinois State University.  He is the author of the book titled "Just Plain Data Analysis: Finding, Presenting, and Interpreting Social Science Data".  Of special note, in the <a href="http://lilt.ilstu.edu/jpda/" title="companion website">companion website</a> for the book Gary provides a summary of the charting differences between <a href="http://lilt.ilstu.edu/jpda/charts/chart%20tips/Chartstip%201.htm" title="Excel 2003 and Excel 2007">Excel 2003 and Excel 2007</a>.</p>

<p>Because we still use Excel 2003 at work I've still not made the change to Excel 2007.  Gary notes in his list of differences between Excel 2003 and 2007 that the macro recorder in Excel 2007 does not work on chart objects.  As a result it is necessary to record macros with 2003 to use them in 2007.  When I read that I immediately referenced John Walkenbach's book titled <a href="http://www.spreadsheetpage.com/index.php/book/C4" title="Excel 2007 Power Programming with VBA">Excel 2007 Power Programming with VBA</a> for a confirmation.  John notes on page 574 that "Microsoft downgraded macro recording for charts to the point where it's virtually useless".  I didn't realize that until now, and the unavailability of macro recording for charts in Excel 2007 will probably sway me against upgrading for a very long time.</p>
            <hr /> 
            <p>Posted on: January 14, 2009  |
            Filed Under: <a href="http://www.cellmatrix.net/index.php/site/category/around_the_web/">Around the Web</a> | 
            <a href="http://www.cellmatrix.net/index.php/site/comments/just_plain_data_analysis_companion_site_and_excel_2007/">Comments:</a> (1)</p> 
            ]]>
      </description>
      <dc:subject>Around the Web</dc:subject>
      <dc:date>2009-01-14T11:27:37-07:00</dc:date>
    </item>

    <item>
      <title>Kelly O&#8217;Day&#8217;s Charts and Graphs Blog</title>
      <link>http://www.cellmatrix.net/index.php/site/kelly_odays_charts_and_graphs_blog/</link>
      <guid>http://www.cellmatrix.net/index.php/site/kelly_odays_charts_and_graphs_blog/#When:11:03:45Z</guid>
      <description>
            <![CDATA[<p>In my opinion Kelly O'Day's <a href="http://processtrends.com/index.htm" title="Process Trends">Process Trends</a> is one of the best charting resources on the web.  If you don't already know, Kelly recently added a <a href="http://chartsgraphs.wordpress.com/" title="Charts &amp; Graphs Blog">Charts &amp; Graphs Blog</a> to the site.  It has been regularly updated for the last few months.</p>


            <hr /> 
            <p>Posted on:  |
            Filed Under: <a href="http://www.cellmatrix.net/index.php/site/category/around_the_web/">Around the Web</a> | 
            <a href="http://www.cellmatrix.net/index.php/site/comments/kelly_odays_charts_and_graphs_blog/">Comments:</a> (0)</p> 
            ]]>
      </description>
      <dc:subject>Around the Web</dc:subject>
      <dc:date>2009-01-14T11:03:45-07:00</dc:date>
    </item>

    <item>
      <title>Minor Bar Chart Annoyance</title>
      <link>http://www.cellmatrix.net/index.php/site/minor_bar_chart_annoyance/</link>
      <guid>http://www.cellmatrix.net/index.php/site/minor_bar_chart_annoyance/#When:09:30:14Z</guid>
      <description>
            <![CDATA[<p>Assume the following data as a chart source . . .</p>

<div class="ctr">
<img src="http://www.cellmatrix.net/images/uploads/2009010901.gif" style="border: 0;" alt="image" width="247" height="113" />
</div>

<p>Now use the Chart Wizard to create a bar chart.  The Wizard produces the following:</p>

<div class="ctr">
<img src="http://www.cellmatrix.net/images/uploads/2009010902.GIF" style="border: 0;" alt="image" width="384" height="252" />
</div>

<p>Most people read from top to bottom.  If you look at the chart the Category items appear to be in reverse order (i.e. D, C, B, A).  However, Excel recognizes the reverse order as the correct order.</p>

<p>It's an easy fix.  Click on the Category axis to bring up the Format Axis Dialog box.  On the Scale tab, select the Categories in reverse order option and the Value (Y) axis crosses at maximum category option.</p>

<div class="ctr">
<img src="http://www.cellmatrix.net/images/uploads/2009010903.gif" style="border: 0;" alt="image" width="417" height="374" />
</div>

<p>This little macro works too (assuming an embedded chart . . click on or activate the chart first and then run it):</p>

<pre>
Sub SetUpBarChart()
    Dim Cht As Chart
    Set Cht = ActiveChart
    With Cht.Axes(xlCategory)
        .ReversePlotOrder = True
        .Crosses = xlMaximum
    End With
End Sub
</pre>

<p>After doing so, the chart looks like this:</p>

<div class="ctr">
<img src="http://www.cellmatrix.net/images/uploads/2009010904.GIF" style="border: 0;" alt="image" width="384" height="252" />
</div>

<p>I wonder why the programmers did not / could not design the bar chart to show categories in a top-to-bottom order first?</p>




            <hr /> 
            <p>Posted on: January 09, 2009  |
            Filed Under: <a href="http://www.cellmatrix.net/index.php/site/category/Charts/">Charts</a> | 
            <a href="http://www.cellmatrix.net/index.php/site/comments/minor_bar_chart_annoyance/">Comments:</a> (3)</p> 
            ]]>
      </description>
      <dc:subject>Charts</dc:subject>
      <dc:date>2009-01-09T09:30:14-07:00</dc:date>
    </item>

    <item>
      <title>Copy Embedded Charts as Shapes with VBA</title>
      <link>http://www.cellmatrix.net/index.php/site/copy_embedded_charts_as_shapes_with_vba/</link>
      <guid>http://www.cellmatrix.net/index.php/site/copy_embedded_charts_as_shapes_with_vba/#When:08:49:41Z</guid>
      <description>
            <![CDATA[<p><a href="http://www.andypope.info/" title="Andy Pope">Andy Pope</a> recently posted a nice bit of code in response to a question posted in the Microsoft Excel Charting Discussion Group.  The question asked how to copy a chart as a shape without using a selection event.  I've struggled with this same question.  Specifically, how do you to copy charts as shapes across different sheets without selecting the destination sheet.  Andy's example does the trick:</p>

<pre>
Sub CopyChartsAsShapes()

    Application.ScreenUpdating = False

    Dim Cht As Chart
    Dim Rng As Range

    Set Cht = Sheets("MC").ChartObjects("Cht1").Chart

    For Each Rng In Sheets("Dash").Range("F4:F11")

        Cht.CopyPicture
        With Rng.Parent
            .Paste
            With .Shapes(.Shapes.Count)
                .LockAspectRatio = msoFalse
                .Left = Rng.Left
                .Top = Rng.Top
                .Width = Rng.Width
                .Height = Rng.Height
            End With
        End With

    Next Rng

    Cht.Deselect
    
    Application.ScreenUpdating = True

End Sub
</pre>

<p>In the example, the procedure copies a chart that resides on the sheet called "MC" to each cell within the range F4:F11 on the sheet called "Dash".  The poster had named the chart "Cht1", which can easily be done by activating, or clicking on the embedded chart and then running the macro below:</p>

<pre>
Sub NameChart()
    ActiveChart.Parent.Name = "Cht1"
End Sub
</pre>

            <hr /> 
            <p>Posted on: January 07, 2009  |
            Filed Under: <a href="http://www.cellmatrix.net/index.php/site/category/Charts/">Charts</a> | 
            <a href="http://www.cellmatrix.net/index.php/site/comments/copy_embedded_charts_as_shapes_with_vba/">Comments:</a> (0)</p> 
            ]]>
      </description>
      <dc:subject>Charts</dc:subject>
      <dc:date>2009-01-07T08:49:41-07:00</dc:date>
    </item>

    <item>
      <title>Floating Bars with Min, Max, and Averages</title>
      <link>http://www.cellmatrix.net/index.php/site/floating_bars_with_min_max_and_averages/</link>
      <guid>http://www.cellmatrix.net/index.php/site/floating_bars_with_min_max_and_averages/#When:13:00:36Z</guid>
      <description>
            <![CDATA[<p>A recent question to the Microsoft Excel Charting Newsgroup asks "How can I create a floating column chart that shows a minimum, maximum, and average value"?  Although Excel 2003 does offer a floating column chart as a custom-type option, it is not as "clean" as desired because the bars are automatically set to a 3D option.  The best alternative is to use a combination Stacked Bar / XY Scatter chart.  The bars will show the minimum to maximum range and the XY series will show minimum, maximum, and average values for each item.  An example of the finished product is below:</p>

<div class="ctr">
<img src="http://www.cellmatrix.net/images/uploads/2008112901.GIF" style="border: 0;" alt="image" width="384" height="252" />
</div>

<p>To build the chart, assume the following set of data:</p>

<div class="ctr">
<img src="http://www.cellmatrix.net/images/uploads/2008112902.gif" style="border: 0;" alt="image" width="299" height="114" />
</div>

<p>Some additional data and calculations need to be added to prepare the chart source.  In the screenshot below, the range A9:C13 will serve as the source of the bar chart.  The original range A2:D6 will serve as the X axis points of the XY chart and the Y points are shown in the range F2:F6.</p>

<div class="ctr">
<img src="http://www.cellmatrix.net/images/uploads/2008112903.gif" style="border: 0;" alt="image" width="375" height="212" /> 
</div>

<p>Start by creating the floating bar chart.  To do so, refer to a process posted at the <a href="http://www.peltiertech.com/" title="Peltier Technical Services">Peltier Technical Services</a> site that illustrates how to make a series invisible so that a second series floats in place (<a href="http://peltiertech.com/Excel/Charts/FloatingColumns.html" title="Floating Columns">titled: Floating Column Charts</a>) as a guide.</p>

<p>In the example, note that the "Dummy1" series is exactly the same as the "Min" values.  The "Dummy2" series is calculated by subtracting the "Min" value from the "Max"value.  Select the range A9:C13 and create a stacked bar chart.  The chart should look like the one below:</p>

<div class="ctr">
<img src="http://www.cellmatrix.net/images/uploads/2008112904.GIF" style="border: 0;" alt="image" width="384" height="252" />
</div>

<p>Double-click the "Dummy1" series.  In the Format Data Series dialog box - Patterns tab, set the Border to None and the Area to None.  The chart should now look like this:</p>

<div class="ctr">
<img src="http://www.cellmatrix.net/images/uploads/2008112905.GIF" style="border: 0;" alt="image" width="384" height="252" />
</div>

<p>Now that the floating bar chart is created, it's time to incorporate an XY Scatter chart which will show the minimum, maximum, and average values.  Select the chart and in the Source Data - Series dialog box, add a third series called "Minimum" based on the range F3:F6.  After doing so, the Source Data - Series dialog box should look like this:</p>

<div class="ctr">
<img src="http://www.cellmatrix.net/images/uploads/2008112906.gif" style="border: 0;" alt="image" width="414" height="462" />
</div>

<p>Note the new third series has appeared as a set of yellow bars.  These bars need to be converted to XY Scatter points.  Click on the new third series (the yellow bars) and, in the Standard toolbar, select Chart -> Chart Type -> XY (Scatter) -> type = Scatter.  After doing so, the chart looks like this:</p>

<div class="ctr">
<img src="http://www.cellmatrix.net/images/uploads/2008112907.GIF" style="border: 0;" alt="image" width="384" height="252" />
</div>

<p>In the Standard Toolbar, select Chart -> Source Data -> "Minimum" Series.  Currently there are no X values selected for the XY points (see the screenshot below):</p>

<div class="ctr">
<img src="http://www.cellmatrix.net/images/uploads/2008112908.gif" style="border: 0;" alt="image" width="414" height="462" />
</div>

<p>Select the Minimum values as the X Value range (see the screenshot below):</p>

<div class="ctr">
<img src="http://www.cellmatrix.net/images/uploads/2008112909.gif" style="border: 0;" alt="image" width="414" height="462" />
</div>

<p>And the chart should look like this:</p>

<div class="ctr">
<img src="http://www.cellmatrix.net/images/uploads/2008112910.GIF" style="border: 0;" alt="image" width="384" height="252" />
</div>

<p>With the incorporation of the XY Scatter points, two new secondary axes have been added to the top and right sides of the chart.  To properly align the new XY points with the bars, the maximum values for these new axes need to reflect the same maximum values of the primary category and value axes.  Double-click on the Secondary Value (X) Axis (the axis values at the top of the chart) and in the Format Axis dialog box -> Scale tab - set the maximum to the same value as the maximum of the Value axis (in this example the maximum is 60).</p>

<div class="ctr">
<img src="http://www.cellmatrix.net/images/uploads/2008112911.GIF" style="border: 0;" alt="image" width="384" height="252" />
</div>

<p>At this point the minimum values are now aligned with the minimum values of the bars.  The same process of adding XY scatter points has to be completed to set up the average and maximum values.  After adding the average and maximum values as XY points, the chart looks like this:</p>

<div class="ctr">
<img src="http://www.cellmatrix.net/images/uploads/2008112912.GIF" style="border: 0;" alt="image" width="384" height="252" />
</div>

<p>All that's left is to do now is some clean-up.  Double-click on the Secondary Value (X) Axis (the axis values at the top of the chart) and in the Format Axis dialog box -> Patterns tab set the Tick Mark Labels and Major Tick Mark Type options to None.  Likewise, double-click on the Secondary Value (Y) Axis (the axis values on the right side of the chart) and in the Format Axis dialog box -> Patterns tab set the Tick Mark Labels and Major Tick Mark Type options to None.  The chart now looks like this:</p>

<div class="ctr">
<img src="http://www.cellmatrix.net/images/uploads/2008112913.GIF" style="border: 0;" alt="image" width="384" height="252" />
</div>

<p>To eliminate the legend references to the "Dummy1" and "Dummy2" series, click first on the legend and second on the "Dummy1" legend entry.  Handles should appear around the "Dummy1" legend entry if it has been selected correctly.  An example of how the chart looks with the "Dummy1" legend entry selected is below:</p>

<div class="ctr">
<img src="http://www.cellmatrix.net/images/uploads/2008112914.gif" style="border: 0;" alt="image" width="388" height="261" />
</div>

<p>To get rid of the "Dummy1" legend entry, hit the delete key.  Follow the same process for the "Dummy2" reference.</p>

<p>Select the plot area.  In the Standard Toolbar select Chart -> Chart Options -> Gridlines and deselect all of the gridline options.  Select the Minimum, Average, and Maximum series and in the Format Data Series dialog box -> Data Labels tab select the X value.</p>

<div class="ctr">
<img src="http://www.cellmatrix.net/images/uploads/2008112915.GIF" style="border: 0;" alt="image" width="384" height="252" />
</div>

<p>Continue to format until finished.</p>
            <hr /> 
            <p>Posted on: November 30, 2008  |
            Filed Under: <a href="http://www.cellmatrix.net/index.php/site/category/Charts/">Charts</a> | 
            <a href="http://www.cellmatrix.net/index.php/site/comments/floating_bars_with_min_max_and_averages/">Comments:</a> (1)</p> 
            ]]>
      </description>
      <dc:subject>Charts</dc:subject>
      <dc:date>2008-11-30T13:00:36-07:00</dc:date>
    </item>

    </channel>
</rss>