View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 1,726
Default Cell Fill Colors

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


--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Michael Kimmerly" wrote in message
...
Pardon me for the semi-hijack. Can you automatically format the text only
portion of a numeric-text string in a cell. For instance, can you bold
only
the text in a string such as "$20,000 High Sales" making the text bold or
a
different color while the numbers stay in standard format?

Thanks


On 1/31/07 9:13 AM, in article
, "Mike"
wrote:

Yes, use the formula option in conditional formatting. Post the condition
you
want to evaluate if you need more assistance



"dbizek" wrote:

Is there a way to program cell fill colors on and off.
Either using the "IF" statement or some other way?