background preloader

Excel Resources

Facebook Twitter

Quick Excel Chart VBA Examples. The use of VBA in Microsoft Excel charting is a topic that would fill a large volume. The examples here are straightforward illustrations of easy techniques to create charts, add and remove series, and move and resize charts using VBA. Outline: Quick Chart VBA Examples VBA Code to Add Chart Objects and Series Add a Chart When you record a macro to add a chart object to a worksheet, Excel comes up with the following code: Sub RecordedAddChartObject() '' RecordedAddChartObject Macro' Macro recorded 5/2/02 by Jon Peltier' Charts.Add ActiveChart.ChartType = xlXYScatterLines ActiveChart.SetSourceData Source:=Sheets("Sheet1").Range("A3:G14") ActiveChart.Location Where:=xlLocationAsObject, Name:="Sheet1" End Sub Excel uses Charts.Add followed later by ActiveChart.Location to create a chart object, and uses ActiveChart.SetSourceData to set all the series data in one shot.

In my examples I use ChartObjects.Add, which also requires (or allows) me to state the position and size of the chart. MacroAlan’s Office Pages. Concatenate Cells. Alan's Homespace. Tables In Excel 2010. Excel Tables A table is a range of cells that hold data, with each row corresponding to a single occurrence of an entity. When you create a table, you can manage and analyze the data in that table independently of data outside the table.

You can format the table, filter the table columns and also publish a table to a server that is running Windows SharePoint Services 3.0 or Windows SharePoint Services “4″. Usually there is an initial row of text headings that describe the columns of data. For example, you might have rows and rows of employee data with the following column headings: First NameLast NameAgeSalary Each row in the table would hold the above details for a particular employee. Creating Tables In Excel 2010 It’s quite easy to create a table in Excel 2010; you simply make a cell active that is in the range of cells you want to convert into a table and then click Insert > Tables > Table. After we convert it to a table, it looks like this: Properties Of Excel Tables.