Get specific color text from excel

Hi,

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.

image

1 Like

Anybody?

@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
    Next

Next

End Sub

Hi

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

@Manikandasamy

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

1 Like

Great
Cheers @Manikandasamy

1 Like

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