Find "." (Full Stop) in cell then all text after colour blue

  • Thread starter Thread starter David Mitchell
  • Start date Start date
D

David Mitchell

I need to be able to search column G in a spreadsheet and where there
is a full stop in the text colour the text after the full stop in
blue.

Strang request, I know! Unfortunately MS Access does not allow more
than one type of formatting in the field and I am not familiar with
Excel programming

Thanks in advance

David
 
Sub ColorText()
Dim RNG As Range
Dim ipos As Integer

For Each RNG In Range("G1:G100")
RNG.Find ".", LookIn:=xlValues
ipos = InStr(1, RNG, ".", vbTextCompare)
If ipos > 0 Then
RNG.Characters(ipos + 1, Len(RNG) - ipos + 1).Font.ColorIndex = 5
End If
Next RNG
End Sub


Chrissy.


David Mitchell wrote
 
Back
Top