Vlookup with 2 different files excel with if condition

Hello everybody,

I have 2 excel files:

I want to fill in column J of the second file when the salary in column F is higher or more less than the salary indicated in the first file in column B. For example for the first line “Sony anderson” has a salary 40000 and as “commercial director” in the first file the average salary is 60000. I want to write a comment in column J “Salary lower than the average salary”.

Do you think that is it possible to do this?

Thank you for your help.

Hi @nelja26

Welcome to UiPath Forum.

Yes it is possible.

Mark as solution and like it if it helps you :slight_smile:

Happy Automation :raised_hands:

Best Regards
Er Pratik Wavhal :robot::man_technologist:t4: :computer:

Hello @nelja26

I had to create your excel on my system that was why I took some time.
I have built a sample workflow that does extactly what you want.
The logic is simple and fast .
The excel containing the Roles and Salary was read and stored in a dictionary.
The Main excel containing the names, age, email, salary and roles was read into a normal data table.
Now the entire business logic was written inside the invoke code.
The logic checks the that the role on each row on the datatable exists in the dictionary and if it does it update the data table result column.
After this the datatable is written in sheet “output” of the Main excel.

Please find attached. when you run this workflow your result would be seen in a sheet called output of the MainExcel.ShowSalaryInfo.zip (34.6 KB)

Best Regards