View Single Post
  #3   Report Post  
Mariela
 
Posts: n/a
Default

Hi Bernie,

Thanks for your help. It's really appriciate.
I have one more question. What should I put in iColor field - number 3 or
something else?

Mariela

"Bernie Deitrick" wrote:

Mariela,

You would need to use a User-Defined-Function. See the definition below.
Copy and paste it into a codemodule in your workbook, then use it like

=ColorWord(A1,3)

to extract the red letters from cell A1.

HTH,
Bernie
MS Excel MVP


Function ColorWord(myCell As Range, iColor As Integer)
Dim i As Integer
ColorWord = ""
With myCell
For i = 1 To Len(myCell.Text)
With .Characters(i, 1).Font
If .ColorIndex = iColor Then
ColorWord = ColorWord & Mid(myCell.Text, i, 1)
End If
End With
Next i
End With
End Function


"Mariela" wrote in message
...
Hi, I have table with A,B,C and D colums and text in the rows.
Some of the words in the text are with bold and different color letter.
I need to extract those words.
How can I do this?

I'm using Excel 2003

Thanks in advance,

Mariela