Skip to main content

How to quickly find and replace character with superscript in Excel?

Author Sun Last modified
find and replace character with superscript
In Excel, we can quickly replace a specific value with another one by applying Find and Replace function, but have you ever suffer with a problem that to find a specific character in specific text string and the replace it as superscript format, such as find YL3 and then replace with YL3 as below screenshot shown. Of course, you can find and replace them one by one, but this method cost too much time. If there are any tricks can quickly replace with superscript in Excel? Follow this article, you will get the answer.

Find and replace with superscript by Find and Replace function

Find and replace with superscript by VBA

arrow blue right bubble Find and replace with superscript by Find and Replace function

Actually, you can use Find and Replace to find the text and then replace with superscript format.

1. Select the range you want to find and replace work for, and press Ctrl + H to open the Find and Replace dialog.

2. In the Find and Replace dialog, click Replace tab, and then enter the text you want to find into the Find what textbox. See screenshot:
enter the charatcer in the find what box

3. Then go to Replace with textbox, enter the text you want to replace with, take notice, hold Alt key and then press 0179 keys on the Number board to enter the superscript number 3. See screenshot:
hold Alt key and then press 0179 keys on the Number board to enter the superscript number

4. Click Replace All. And a dialog pops out to remind you how many replacements have been done. See screenshot:
click replace all to get the result

Tip: But with this method, you only can superscript number 2 by pressing 0178, and 3 by 0179.

a screenshot of kutools for excel ai

Unlock Excel Magic with Kutools AI

  • Smart Execution: Perform cell operations, analyze data, and create charts—all driven by simple commands.
  • Custom Formulas: Generate tailored formulas to streamline your workflows.
  • VBA Coding: Write and implement VBA code effortlessly.
  • Formula Interpretation: Understand complex formulas with ease.
  • Text Translation: Break language barriers within your spreadsheets.
Enhance your Excel capabilities with AI-powered tools. Download Now and experience efficiency like never before!

arrow blue right bubble Find and replace with superscript by VBA

With Find and Replace function, only can replace the number with superscript. If you want to replace letter with superscript as below screenshot shown, you can apply VBA code to solve it.

1. Press Alt + F11 keys to open Microsoft Visual Basic for Applications window.

2. Click Insert > Module, and paste below VBA code to the script.

VBA: Find and replace with superscript format

Sub DoConvert()
'UpdatebyExtendoffice20160705
    Dim xRg As Range
    Dim xTxt As String
    Dim xCell As Range
    On Error Resume Next
    If ActiveWindow.RangeSelection.Count > 1 Then
      xTxt = ActiveWindow.RangeSelection.AddressLocal
    Else
      xTxt = ActiveSheet.UsedRange.AddressLocal
    End If
    Set xRg = Application.InputBox("Select a range:", "Kutools for Excel", xTxt, , , , , 8)
    If xRg Is Nothing Then Exit Sub
    For Each xCell In xRg
        If xCell.Value = "YL3" Then
            xCell.Characters(1, 1).Font.Superscript = True
        End If
    Next
End Sub

copy and paste the code into the module

3. Press F5 key to run the code, and a dialog pops out to remind you select a range. See screenshot:
vba code to selec the data range

4. Click OK, the specific character in specific string has been converted to be superscript format in the selection. See screenshot:
the specific character is converted to be superscript format

Tip: in the code, “YL3” is the string you want to find from, and (1, 1) indicates to convert first 1 character of the string, if you want to convert first two character, you can change it as (1, 2), if you want to convert 1 character from second character of the string, you can change it as (2, 1).

Best Office Productivity Tools

🤖 Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions
Popular Features: Find, Highlight or Identify Duplicates   |  Delete Blank Rows   |  Combine Columns or Cells without Losing Data   |   Round without Formula ...
Super Lookup: Multiple Criteria VLookup    Multiple Value VLookup  |   VLookup Across Multiple Sheets   |   Fuzzy Lookup ....
Advanced Drop-down List: Quickly Create Drop Down List   |  Dependent Drop Down List   |  Multi-select Drop Down List ....
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Ranges & Columns ...
Featured Features: Grid Focus   |  Design View   |   Big Formula Bar    Workbook & Sheet Manager   |  Resource Library (Auto Text)   |  Date Picker   |  Combine Worksheets   |  Encrypt/Decrypt Cells    Send Emails by List   |  Super Filter   |   Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters, ...)   |   50+ Chart Types (Gantt Chart, ...)   |   40+ Practical Formulas (Calculate age based on birthday, ...)   |   19 Insertion Tools (Insert QR Code, Insert Picture from Path, ...)   |   12 Conversion Tools (Numbers to Words, Currency Conversion, ...)   |   7 Merge & Split Tools (Advanced Combine Rows, Split Cells, ...)   |   ... and more
Use Kutools in your preferred language – supports English, Spanish, German, French, Chinese, and 40+ others!

Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time.  Click Here to Get The Feature You Need The Most...


Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!