I think you would do it something like this:
Sub dk()
asdf = "Hi"
tempVal = Range("A1").Value & asdf
Range("A1") = tempVal
Range("A1").Characters(Len(tempVal) + 1 - Len(asdf), _
Len(asdf)).Font.ColorIndex = 3
End Sub
"jasminesy" <(E-Mail Removed)> wrote in message
news:554BB9D8-9131-4A94-B5F8-(E-Mail Removed)...
> is it possible to color code text that will be inserted into other text:
>
> asdf="HI"
> if Range("a1")<>"" then
> tempval=Range("a1").value
> Range("a1").ClearContents
> Range("A1")=tempval & asdf
>
>
> but I want "asdf" to be red (existing as is)???
> Is there anyway to do that other than inserting it, searching it and then
> color coding it??????
|