BUY EXCEL BOOKS ONLINE: 1. VBA & Macros      2. VBA for Modelers      3. Excel 2013 VBA and Macros     
4. Excel VBA for Dummies      5. Excel with VBA & .NET      6. Mastering VBA      7. Excel 2013 Programming

SuperScript or Subscript the First or Last Character of Text in Selected Range Cells

    Sub SuperScriptFirstCharacter()
        ' This module will make first character super scripted in the selection.
        Dim MyCell As Range
        For Each MyCell In Selection.Cells
            If Len(Trim(MyCell.Value)) > 0 Then
                MyCell.Characters(Start:=1, Length:=1).Font.Superscript = True
            End If
        Next
    End Sub




    Sub SuperScriptLastCharacter()
        ' This module will make last character super scripted in the selection.
        Dim MyCell As Range
        For Each MyCell In Selection.Cells
            If Len(Trim(MyCell.Value)) > 0 Then
                MyCell.Characters(Start:=Len(MyCell.Value), Length:=1).Font.Superscript = True
            End If
        Next
    End Sub


    Sub SubScriptFirstCharacter()
        ' This module will make first character subscript in the selection.
        Dim MyCell As Range
        For Each MyCell In Selection.Cells
            If Len(Trim(MyCell.Value)) > 0 Then
                MyCell.Characters(Start:=1, Length:=1).Font.Subscript = True
            End If
        Next
    End Sub


    Sub SubScriptLastCharacter()
        ' This module will make last character subscript in the selection.
        Dim MyCell As Range
        For Each MyCell In Selection.Cells
            If Len(Trim(MyCell.Value)) > 0 Then
                MyCell.Characters(Start:=Len(MyCell.Value), Length:=1).Font.Subscript = True
            End If
        Next
    End Sub