Excel if function

Hi, Team!

I have an excel file and I want to keep only the rows that meet the condition Column B <> Column C (appear in yellow).
How can I do this?

image

Thank you in advance,

Basicly,
Read the excel
Put that table in a for each row,
Inside of for each use an if row(“Sign - OLD”) <> row(“Sign - NEW”)
If true use add data row(you will put that row to another table)

So you get that specific row on other table. Cheers!

1 Like

Hi @LZlz

*First Read the excel sheet and create a datatable variable by using read range activity from workbook
*Then use For each row and pass the datatable variable and use Assign Activity Create a Int variable as Count and assign value as 0 and drag and drop another assign activity there use like this count = count +1 .then use
*If condition
row(“sign-OLD”).ToString.Equal(row(“Sign-New”).Tostring)
*And in Else side use set range color activity and in the properities Input color will be
System.Drawing.Color.Yellow and Range will be “A”+(Count+1).Tostring + “:C”+(Count+1).Tostring and sheet Name will be your related excel sheet name

That’s It ,I hope it will be useful for you
If you find it useful mark it as solution and close the thread.

Thank You,
Regards,
Gulshiyaa

2 Likes

And If You want you can verify This also

Thank you!
Solved! Worked!

I tried the solution you proposed and it worked. I learned something new! I didn’t know how to mark a row with a certain color if it meets a certain condition …

Thank you!

1 Like

you’re most welcome @LZlz

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