I want to get the counter of the text color in excel.
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.
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.
Use read range activity to get the content into data table.
Assign redcolorcounter variable is equal to zero.
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.
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
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.
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