VBA Werte in Zellen formatieren

Ein benutzerdefiniertes Zellenformat lässt sich mittels VBA einfach einrichten:

dim zahl as double
zahl = 4,356

' Darstellung z.B. als Gewicht in Tonnen
cells(1,1) = Format(zahl, "0.0 t")

Wenn gezielt Zahlen formatiert werden sollen, verwende ich NumberFormat:

    With Range(Cells(3, lkw.GW_SOLL_SPALTE), Cells(x, lkw.GW_IST_SPALTE))
        .Font.Size = 10
        .Font.Bold = True
        .HorizontalAlignment = xlRight
        .NumberFormat = "0.00 ""t"""
    End With