I want to put value in column C/Final color wrt column A/order number and column B/colour.
For e.g.
same order number will have same color in final color column.
But final color value in Final color column for respective ON depends on preference of color Preference: (White>Yellow>Green)
which means if one value for ON 1 is yellow and one value for ON1 is white, we will give preference to white and write same in Final color column value.
PFA snip for reference
Would prefer if someone can provide a excel formula for same instead of gng via UiPath. Thanks in advance.
Assuming you have a DataTable named “dataTable” with columns “ON” and “Preference,” and you want to calculate “FinalColor” in column C
For Each row As DataRow In dataTable.Rows
Dim orderNumber As String = row(“ON”).ToString()
Dim preference As String = row(“Preference”).ToString()
Dim finalColor As String = “”
If preference = "White" Then
finalColor = "White"
ElseIf preference = "Yellow" Then
finalColor = "Yellow"
ElseIf preference = "Green" Then
finalColor = "Green"
End If
Assign the calculated final color to the "FinalColor" column in the same row
row("FinalColor") = finalColor
hey! column Names are being showed in image itself. There is no other column except that.
Also, is there any way of excel formula instead of going via UiPath?
=LET(Matrixvals;CHOOSECOLS(UNIQUE(FILTER($E$2:$F$9;$E$2:$E$9=E2);FALSE;FALSE);2) ← should still be a 2 not 6. It takes the 2nd column of the defined matrix, not the 6 column in your excel
if you type excel formulas, do you normally use , or ;. Because I have seen both, if you need to use , you need to replace all. If you use ; anyway, then it’s not the issue of ; or ,.
Since I work with DE Excel and Formulas, not the EN version