Superscript entire value in a cell

This tutorial shows how to superscript (above the line) all of the characters in a cell using Excel or VBA


METHOD 1. Superscript entire value in a cell

EXCEL

Right-click on cell > Format Cells > Select Font tab > Check Superscript > Click OK

1. Right-click on the cell that contains the content that you want to format to superscript.
2. Select Format Cells.
Note: in this example we have selected cell B2 which contains value of x4.
Right-click on cell and select Format Cells - superscript entire cell

3. Select the Font tab.
4. Check the Superscript checkbox.
5. Click OK
Select Font tab, check superscript and click OK

This image shows the result of this process, which has applied a superscript format to an entire value in a cell. Superscript format applied to entire cell

METHOD 1. Superscript entire value in a cell

VBA

Sub Superscript_entire_value_in_cell()
'declare a variable
Dim ws As Worksheet
Set ws = Worksheets("Analysis")
'superscript a character in a cell
ws.Range("B2").Font.Superscript = True

End Sub

ADJUSTABLE PARAMETERS
Worksheet Selection: Select the worksheet in which you want to apply a restriction to a cell by changing the Analysis worksheet name in the VBA code. You can also change the name of this object variable, by changing the name 'ws' in the VBA code.
Cell Reference: Select the cell that contains the value that you want to superscript by changing the cell reference ("B2") in the VBA code.

Explanation about how to superscript entire value in a cell

EXPLANATION

EXPLANATION

This tutorial shows how to superscript (above the line) all of the characters in a cell using Excel or VBA.
This tutorial provides one Excel method and one VBA method that can be applied to superscript all of the characters in a single cell. Using the Excel method this can be achieved in five steps by using the Format Cells options. The VBA method uses the Font.Superscript function to apply the superscript format against an entire cell.

RELATED TOPICS

Related Topic Description Related Topic and Description
How to superscript (above the line) only some characters in a cell
How to clear formatting in cells