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
00A98272-95A0-4C31-BA92-D46FF45BE21F@microsoft.com, "Mike"
> Yes, use the formula option in conditional formatting. Post the condition you
> want to evaluate if you need more assistance
>
>> Is there a way to program cell fill colors on and off.
>> Either using the "IF" statement or some other way?
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

Signature
---
HTH
Bob
(there's no email, no snail mail, but somewhere should be gmail in my addy)
> 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
[quoted text clipped - 14 lines]
>>> Is there a way to program cell fill colors on and off.
>>> Either using the "IF" statement or some other way?
Michael Kimmerly - 31 Jan 2007 16:50 GMT
Thanks Bob. Will study the code, been years since I used VB or VBA, but I
assumed it could be done that way. A co-worker thought standard or
conditional formatting could do it but I could not figure a way. Much
Appreciated.
On 1/31/07 10:28 AM, in article #eHOYTVRHHA.4000@TK2MSFTNGP04.phx.gbl, "Bob
Phillips" <bob.NGs@xxxx.com> wrote:
> Not without VBA.
>
[quoted text clipped - 24 lines]
> 'placed in the appropriate worksheet code module, not a standard
> 'code module. To do this, right-click
Gord Dibben - 31 Jan 2007 17:29 GMT
Typo patrol!
Change to If Not IsNumeric for bold text and standard numbers.
Gord Dibben MS Excel MVP
>Not without VBA.
>
[quoted text clipped - 24 lines]
>'placed in the appropriate worksheet code module, not a standard
>'code module. To do this, right-click
Bob Phillips - 31 Jan 2007 19:03 GMT
Not a typo Gord, I really thought he wanted the numbers bolded, its the eyes
failing :-(

Signature
---
HTH
Bob
(there's no email, no snail mail, but somewhere should be gmail in my addy)
> Typo patrol!
>
[quoted text clipped - 30 lines]
>>'placed in the appropriate worksheet code module, not a standard
>>'code module. To do this, right-click
Gord Dibben - 31 Jan 2007 22:24 GMT
I stand corrected on the "typo" pickup.
Now......if we could just get the eyesight corrected as easily<g>
>Not a typo Gord, I really thought he wanted the numbers bolded, its the eyes
>failing :-(