Bulk insert of chart titles?
I have several worksheets in a workbook, the layout on each worksheet is the
same as the others, and each sheet has a chart, displaying charts of the data in each worksheet. I am able to insert chart titles into each chart, one at a time, but would like to do this as a single operation, in other words is there any way that I can insert a title in each chart referencing the same cell in each worksheet, in one operation? |
Bulk insert of chart titles?
Stan -
You need a little macro to do what you want. This loops through every worksheet in the active workbook, and for every chart on the worksheet, it adds a title that is linked to cell A1 of that worksheet. Sub InsertChartTitles() Dim chtob As ChartObject Dim ws As Worksheet For Each ws In ActiveWorkbook.Worksheets For Each chtob In ws.ChartObjects With chtob.Chart .HasTitle = True .ChartTitle.Text = "=Sheet1!R1C1" End With Next Next End Sub - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions http://PeltierTech.com _______ "SouthAfricanStan" <me@there wrote in message ... I have several worksheets in a workbook, the layout on each worksheet is the same as the others, and each sheet has a chart, displaying charts of the data in each worksheet. I am able to insert chart titles into each chart, one at a time, but would like to do this as a single operation, in other words is there any way that I can insert a title in each chart referencing the same cell in each worksheet, in one operation? |
All times are GMT +1. The time now is 09:47 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com