Get specific color text from excel


Please help me to get only specific color text from Excel.

I want to extract only green color and red color character from the string. Is it possible. Please help.


1 Like


@Palaniyappan Sorry to drag you here.
do you have any idea on this.

Sub colortest()

For I = 1 To 2
For j = 1 To Len(Cells(I, 2).Value)
If Cells(I, 2).Characters(Start:=j, Length:=1).Font.Color <> xlAutomatic Then

            MsgBox "Found colored character"
          End If


End Sub


no worries

May i know how this will be done manually when opened excel
if done via Macros then that vb script can be executed with execute macro or Invoke VBA activity


Sorry for the late reply, i found a solution, I used a VB script to take those strings. :slight_smile:Thanks again

1 Like

Cheers @Manikandasamy

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.