The VBA code in this repository helps make Excel charts visually appealing—ideal for publications and presentations.
Preparing Excel charts for regular publications or presentations can be tedious and time-consuming. Spreadsheets often contain raw data and calculations that are irrelevant to colleagues or editors. This VBA tool automates the routine editorial process of chart formatting.
The program:
- Copies the data from any selected Excel chart to a new worksheet
- Applies consistent formatting automatically
- Allows the creation of one or two chart copies (e.g., for multilingual use)
- Offers two size options: small (e.g., for print) or large (presentation-ready)
- Supports different title placements: inside a text box, as a standard chart title, or with no title
⚠️ Note: This tool is designed to prettify simple chart types (e.g., line and column charts). It may not work correctly with complex chart types such as pie charts, radar charts, or scatter plots.
-
Activate the chart
Click once on the surface of the Excel chart you want to prettify. -
Click 'Format chart'
Go to the Add-ins menu bar in Excel and click the Format chart button.
-
Accept trust prompts
Accept any messages related to macro or trust settings. -
Customize formatting
A user form will open. Choose your preferred formatting options.
-
Click 'Execute'
Press the Execute button to start formatting. -
View the output
A new worksheet will be created, containing:
- Download the Excel add-in file (
ChartFormatter.xlam
) from this repository. - Open any Excel workbook.
- Double-click the
ChartFormatter.xlam
file located in theInstall
folder to load the add-in.
- The VBA code is compiled into a
.xlam
Excel Add-in file. - Object-oriented programming principles are applied using VBA classes, types, and collections.
- Tested on Excel 2016 Professional Plus.
- Licensed under GPLv3. Please review the license terms before modifying or distributing the source code.