Excel VB - Macro for mixed fonts

  • Thread starter Aileen Ambrosio
  • Start date
A

Aileen Ambrosio

I'm trying to create a macro that will change fonts style automaticall
in a single cell. For example in manual doing this is possible, typin
any data in a single cell can produced mixed fonts by just changing th
font style everytime you want to change the character, but how can thi
be done in macro and just typing a shortcut key for easy encoding an
not clicking the font name or style anymore
 
G

Gord Dibben

Aileen

Adjust to suit.......

Sub CellFont()
With ActiveCell.Characters(Start:=1, length:=5).Font
.ColorIndex = 3
.Bold = True
.Underline = True
.Size = 14
End With
With ActiveCell.Characters(Start:=6, length:=3).Font
.Superscript = True
.ColorIndex = 5
End With
End Sub

Gord Dibben Excel MVP
 
Top