Excel Subscript & Superscript
Subscript or superscript are mostly used in scientific notation or in Chemical equations.
Like: E = MC2 . 2 as super script to mention a ‘Square’.
Follow these steps to make a part of text as subscript.
- Select a text in Excel or part of the Text.
- Right click & choose Format Cells (or Ctrl + 1).
- Find for Effects section in Fonts tab
- Click check box against subscript or superscript.
- Click ok
Now the text that you selected will become subscript. There are no easy keyboard shortcuts for this option as of now.
How to make subscript using Excel VBA?
We are going to use the characters property of range object. Using this we can select only a part of the text, then change its font option subscript to true.
Here is the code on how it is done.How to Type a Subscript in ExcelVisual Basic123456789'Function to Text the MacroSub Test_Subscript()Subscript_Text Range("A1"), 2, 2End Sub'Actual Excel VBA code to convert Text to SubscriptSub Subscript_Text(rRng As Range, iStart As Integer, iLen As Integer)rRng.Characters(Start:=iStart, Length:=iLen).Font.Subscript = TrueEnd Sub
For example: In cell A1 type E=MC2. Then rename the subscript to superscript in above function. Press F5.
Now, you can see that the number 2 is changed to a superscript.
Just like this, we can also make other font modifications to Excel sheet like: Strikethrough, underline, overline etc.,
How To Type Subscript in Excel – Superscript Options – Excel VBA Code
- Block Apps in FaceBook print screen Excel Countif Record Macro Timer in Excel Task Manager VCF HTML Table Import Data Thumbnails Text to Speech TTS Candy Crush C++ Programing Machine learning AI bulk email Excel VBA vba color index vba color codes Android social media Twitter Google+ Google Adsense Tips bitcoin Calendar in Excel outlook vba mass email Data Mining Excel Macro Facebook WhatsApp Wordpress python