Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, 2013, 2016, 2019, 2021, 2024, and Excel in Microsoft 365. If you are using an earlier version (Excel 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Excel, click here: Finding and Replacing in Text Boxes.
Written by Allen Wyatt (last updated December 20, 2025)
This tip applies to Excel 2007, 2010, 2013, 2016, 2019, 2021, 2024, and Excel in Microsoft 365
David wonders if it is possible to use Find and Replace to locate and modify text in text boxes or in labels in charts. The short answer is that it is not possible, but there are several workarounds you can try.
First, you could easily make the text in your text boxes or in your chart labels dynamic, so that it is tied to the contents of some worksheet cells. For instance, you could do the following for your text boxes:
That's it. You can use the same technique with custom chart labels—all you need to do is select the chart label and enter a cell reference in the Formula bar. With the text boxes and chart labels tied to worksheet cells, you can easily use Find and Replace to search for and change information in the cells. When the changes are made, the text boxes and chart labels should automatically reflect the changes in the cells.
The only way to actually change the text within a text box or chart label is to change it manually or change it using a macro. The code would need to step through each text box in the worksheet and then make your change. The following is a simple version of a macro that can make such a change.
Sub TextBoxReplace()
Dim shp As Shape
Dim sOld As String
Dim sNew As String
'Change as desired
sOld = "Old string"
sNew = "New string"
On Error Resume Next
For Each shp In ActiveSheet.Shapes
With shp.TextFrame.Characters
.Text = Application.WorksheetFunction.Substitute( _
.Text, sOld, sNew)
End With
Next
End Sub
This macro steps through all the shapes in the worksheet (text boxes are shapes) and then replaces whatever is in the sOld variable with whatever is in the sNew variable. Applying the same technique to chart labels is only a bit more complex, as shown in the following macro:
Sub ChartLabelReplace()
Dim Cht As ChartObject
Dim Ser As Series
Dim scPt As Point
Dim sOld As String
Dim sNew As String
'Change as desired
sOld = "Old String"
sNew = "New String"
On Error Resume Next
For Each Cht In ActiveSheet.ChartObjects
For Each Ser In Cht.Chart.SeriesCollection
For Each scPt In Ser.Points
With scPt.DataLabel
.Text = Application.WorksheetFunction.Substitute( _
.Text, sOld, sNew)
End With
Next
Next
Next
End Sub
The macro steps through each data label for every data series on every chart and (again) replaces any instances of whatever is in sOld with whatever is in sNew.
Note:
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (9264) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, 2021, 2024, and Excel in Microsoft 365. You can find a version of this tip for the older menu interface of Excel here: Finding and Replacing in Text Boxes.
Professional Development Guidance! Four world-class developers offer start-to-finish guidance for building powerful, robust, and secure applications with Excel. The authors show how to consistently make the right design decisions and make the most of Excel's powerful features. Check out Professional Excel Development today!
Macros are great for processing large amounts of data quickly. This tip examines several ways you can remove specific ...
Discover MoreDo you often want to search through a worksheet by column rather than by row? Excel defaults to searching by row, of ...
Discover MoreIf you use a worksheet that contains dates, you might want to search for those dates at some point. This isn't as simple ...
Discover MoreFREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
2025-12-22 11:48:02
J. Woolley
The ReplaceShapeText macro in My Excel Toolbox will find and offer to replace specified text in each shape on the active sheet or on all sheets of the active workbook. It includes logic to search grouped shapes plus options to match alphabetic case, whole words, and hidden shapes (such as Notes). Text formatting is preserved. This macro does not apply to chart labels but does apply to text boxes or other shapes added to charts. A log of the results can be copied to the clipboard then pasted into a worksheet or other document.
See https://sites.google.com/view/MyExcelToolbox/
2025-12-20 10:11:28
Ken
I often have a lengthy formula in 12 different worksheets within the same workbook, that need to be edited to change, for instance, the month name. Manually doing so is a lengthy and time consuming task. Is it possible, by grouping the worksheets, to edit a formula in a cell with the Find and Replace tool?
Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2025 Sharon Parq Associates, Inc.
Comments