You can't do this in XL. However you can do it with VBA Event macros.
Put this in your worksheet code module (right-click the worksheet tab
and choose View Code):
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
Const sPREFIX As String = "- Adjustable Paper Tray "
If Not Intersect(Target, Range("A3:A4")) Is Nothing Then
With Range("A5")
.ClearFormats
Application.EnableEvents = False
.Value = sPREFIX & Format(Range("A4").Value - _
Range("A3").Value, "0.00")
Application.EnableEvents = True
With .Characters(1, 1).Font
.Name = "Wingdings"
.Color = vbRed
.Size = 10
End With
With .Characters(2, Len(sPREFIX) - 1).Font
.Name = "Arial"
.Color = vbBlack
.Size = 10
End With
With .Characters(Len(sPREFIX) + 1).Font
.Name = "Arial"
.Color = vbBlack
.Size = 8
End With
End With
End If
End Sub
Now whenever an entry is made in A3 or A4, A5 (change to suit) will
contain the formatted entry.
In article ,
"DHD58" wrote:
Is there any way of doing this in Excel as it is? If not,is there any chance
of incorporating such a function into the next version?
|