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

Comments