Sort based on Color

Hi,
I have an excel sheet which have color in it.
I have to sort the sheet based on colors.
First comes all dark reds than blood red than orange,green,yellow.
Can you help me with the approach?
Color.xlsx (9.8 KB)
Here I have attached the excel sheet containing the same.

@supermanPunch @Gokul001 @ushu @kirankumar.mahanthi1 @Palaniyappan @Sudharsan_Ka @Anil_G

one of many options:

  • iterate over the excel with excel activity: for each Excel row
    • check the color and write it to cell next right column to it
    • then we can sort it e.g. by a custom sort or we map the color to a number and sort it numerical

@ppr
Like can we have a macro or vb code which could give us the solution??
Thanks in advance!!

Color Info writing with essential UiPath Activities could look like this:

then we would preprocess the result

when this is preferred, then let’s stop efforts investing in an UiPath modeling approach

Hi @ppr
But the point is we have many colors in the sheet and we have to sort them in order.
So that is why I asked if we can do it by macro or vb.
If you have any other option that can sort in that manner, it is also preferred.
Just the point is to get the solution for the problem.
Thanks!!

hi @Kunal_Jain

Excel Application Scope
Read Range
Invoke VBA
VBScript code to sort Excel by color

Sub SortByColor()
Your sorting logic here
End Sub

Excel Application Scope
Write Range

Hope this helps