The counter of text color in excel

Dear Experts,

I want to get the counter of the text color in excel.

image

For the excel file, the counter number of text color is three. I want the counter value.
If there is any solution or workaround, please let me know. I attached the excel file as reference.
Thank you.

test.xlsx (9.2 KB)

Hi @Zaw_Win_Htun1 ,

Please find the below reference which will help you to get the color index of the excel cell in our case the index should be 3 (red color).

for your requirement we have to enhance the approach available in the above reference like below steps.

  1. Use read range activity to get the content into data table.

  2. Assign redcolorcounter variable is equal to zero.

  3. Use for each loop and increase the cell reference dynamically and keep one if condition that cell color index = 3 then use redcolorcounter variable and increase plus 1. At the end of the flow use log message and print the redcolorcounter to find out how many red color text available in the excel.

please try the above steps and let us know. thanks.

Regards,
Kirankumar.

this code is working fine to solve your problem
put the invoke code in same place as Main change the path to excel ( the file you put is empty)
Nouveau dossier.zip (3.1 KB)
I hope this help you

hello Kirankumar,

I don’t want to find the color index of the excel cell. I just want the number of text color in excel. For my excel file, I have three line of red color so I want the three as the integer.
Thanks.

Hi Youssef,

The solution is not working and I have encountered the issue.

go to option in excel-> Trust center ->trust center setting->macro settings-> check the trust access VBA

1 Like