Toggle Bullet and Sub-Bullet

When I feel like getting fancy, it can be nice to include a bulleted list in an Excel sheet to describe assumptions, etc. This is actually pretty easy to do, but requires adding some odd characters. This macro will add a character and change the font of a cell to create a bullet. If you run this macro on a cell which already contains a bullet, an arrow shaped sub-bullet is inserted instead.

' Toggles a bullet and an arrow
' Copyright under GPL by Mark Grimes
' Keyboard Shortcut: Crtl+Shift+B
'
Sub mgBullet()
    If ActiveCell.Formula = "l" Then
        Selection.Font.Name = "Wingdings"
        ActiveCell.FormulaR1C1 = "bullet"
        ' Replace the text bullet with the bullet symbole from Wingdings
        ' Found that others don't have wingdings 3, it's sub-bullet was better
        ' Selection.Font.Name = "Wingdings 3"
        ' ActiveCell.FormulaR1C1 = "}"
    Else
        Selection.Font.Name = "Wingdings"
        ActiveCell.FormulaR1C1 = "l"
    End If

    With Selection
        .HorizontalAlignment = xlCenter
        .VerticalAlignment = xlBottom
        .WrapText = False
        .Orientation = xlHorizontal
    End With
End Sub

Published

July 26, 2005 1:56AM

Tags

License

The contents of this blog are licensed under the Creative Commons “Attribution-Noncommercial-Share Alike 3.0″ license.