View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.programming
Gord Dibben Gord Dibben is offline
external usenet poster
 
Posts: 22,906
Default Cell Fill Colors

Typo patrol!

Change to If Not IsNumeric for bold text and standard numbers.


Gord Dibben MS Excel MVP

On Wed, 31 Jan 2007 16:28:18 -0000, "Bob Phillips" wrote:

Not without VBA.

Option Explicit

Private Sub Worksheet_Change(ByVal Target As Range)
Const WS_RANGE As String = "H1:H10" '<== change to suit
Dim i As Long

On Error GoTo ws_exit
Application.EnableEvents = False

If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then
With Target
For i = 1 To Len(.Value)
If IsNumeric(Mid(.Value, i, 1)) Then
.Characters(i, 1).Font.Bold = True
End If
Next i
End With
End If

ws_exit:
Application.EnableEvents = True
End Sub

'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click