Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Color text inserted into other text
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?????? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Color text inserted into other text
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" wrote in message ... 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?????? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
add some text in a cell that has just been inserted | Excel Programming | |||
Copy text cell & change text color conditionally | Excel Programming | |||
Cond. format text color based on another's text color | Excel Discussion (Misc queries) | |||
Blank space gets inserted after text | New Users to Excel | |||
Text not all displaying in a cell, what is max that can be inserted? | Excel Worksheet Functions |