Color cell vb.net/LINQ

Hi people !

I’m trying to use vb.net/LINQ, but I don’t know the possibilities that this feature offers, I’m trying this function assign =If(Row(“NAMECOLUNN”).ToString Is “NOK”,color.Red,color.Green) of this function and color the cells red corresponding to nok otherwise color it from green to ok, but this function is working.

Hi

We can use the same with a simple if condition and a Ser range Color activity like this

Row(“NAMECOLUNN”).ToString.Contains(“NOK”)

If true it goes to then block where use set range Color and mention the same expression as you had like System.Drawing.Color.Red

And same with else block like
System.Drawing.Color.Green

Cheers @Luan

1 Like

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