Delila_1 Creative Commons License 2009.06.12 0 0 9537

Egy kis játék a cellán belüli formázáshoz:

 

Sub szinez()
    Range("B1").Formula = Cells(1, 1) & " " & Cells(2, 1) & " " & UCase(Cells(3, 1)) _
        & " " & Cells(4, 1) & " " & Cells(5, 1)
    eh = Len(Cells(1, 1)): mh = Len(Cells(2, 1)): hh = Len(Cells(3, 1))
    nh = Len(Cells(4, 1)): oh = Len(Cells(5, 1))
    Range("B1").Select
    Selection.Copy
    Selection.PasteSpecial Paste:=xlPasteValues
    ActiveCell.Characters(Start:=1, Length:=eh).Font.ColorIndex = 5
    With ActiveCell.Characters(Start:=eh + 2, Length:=mh).Font
        .ColorIndex = 3
        .Superscript = True
    End With
    With ActiveCell.Characters(Start:=eh + mh + 3, Length:=hh).Font
        .ColorIndex = 45
        .Bold = True
    End With
    With ActiveCell.Characters(Start:=eh + mh + hh + 4, Length:=nh).Font
        .ColorIndex = 13
        .Subscript = True
    End With
    With ActiveCell.Characters(Start:=eh + mh + hh + nh + 5, Length:=oh).Font
        .ColorIndex = 10
        .Underline = xlUnderlineStyleSingle
    End With
End Sub