LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default different text colours in the same cell in excel

Thanks for your response. I managed to get what i want by using your
suggestion of recording a macro.

Thank you very much for your time and energy.

cheers

Nipun

"Don Guillett" wrote:

this line changes your formula to a value which you said that you did NOT
want. Again, you can NOT do what you want. "People in hell want ice water"

.Cells(2).Value = .Cells(1).Value


--
Don Guillett
SalesAid Software

"Nipun" wrote in message
...
Thank You for replying... I understood your logic... I think it should
work... Im new to macros so please can you help me with executing it in
detail...

"JE McGimpsey" wrote:

one way:

Since you can't have multiple font colors in a cell containing a
formula, replace the formula with an event macro:

Put this Event macro in your worksheet code module (right-click the
worksheet tab and choose view Code):

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
Dim i As Long
With Range("A2:B2")
If Not Intersect(Target, .Cells(1)) Is Nothing Then
On Error Resume Next
Application.EnableEvents = False
.Cells(2).Value = .Cells(1).Value
Application.EnableEvents = True
On Error GoTo 0
For i = 1 To Len(.Cells(1).Text)
.Cells(2).Characters(i, 1).Font.ColorIndex = _
.Cells(1).Characters(i, 1).Font.ColorIndex
Next i
End If
End With
End Sub


In article ,
Nipun wrote:

I have a formula which copies the text in cell A2 into B2. The text is
typed
in A2 in two different colours but when it is copied into B2 it shows
in one
colour. Is it possible for it to show it in the same colours or is it
possible for me to have a function that locates a character and changes
the
colour of that character only and not the remaining characters in the
cell




 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy from a Cell to a text box. AJL Excel Worksheet Functions 9 November 7th 06 04:58 PM
How do I get selected text within a cell to remain bold in excel? dixielady Excel Discussion (Misc queries) 2 May 27th 06 09:40 AM
Text not continuing to wrap for large block of text in Excel cell Mandra Charts and Charting in Excel 1 May 15th 06 07:13 PM
Just one cell in an Excel column won't text wrap. Kathleen New Users to Excel 1 January 21st 06 08:28 PM
Wrap text ceases to function in Excel if cell exceeds 9 lines nycemail Excel Worksheet Functions 1 July 24th 05 06:09 PM


All times are GMT +1. The time now is 08:27 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"