How to compare equality

I have two excel files with some data . Need to compare both data and update the status in different column match or not match. please help.

Hi @khan check out this simply .xaml … You will understand how to compare 2 Excel files (14,1 KB)

When you got the match, just put a write cell activity or something else to update the cell value, or whatever you need. Really, I dont know exactly what you need, but whit this .xaml you will see the comparation between 2 Excel files using DataTables.


Hi Pablo… Thanks for your solution…But I am aware of this concept. But my requirement is bit different. I need not to compare two column which are beside each other. Suppose. Some data is there in Column “A” . But we need to check whether same data is present in column “B” or not in entire row t. Not in front cell only… we need match one cell for entire row… same will run on loop for others.

I don’t really understand what you need… you want to compare, for example, column A with column ZZZ?
Sorry for the mistake.

To do that i will recomment you to use datatables. Read the columns you need and then put them into datatable. After this you can work with that data and if you need to put the data in the column that you want, you will be able

Also if you want to work with the excel file, you will need to make a counter to move between the columns of the excel file.

I want to compare two rows… But data are not exactly present in same cell. Suppose We have 2 rows. A & B. A1 having some data, and we need compare this data which can be available in B1, B2 or B3 or B10. How to validate whether A1 data is available in somewhere in “B” rows. If yes, we need to update “C” its “AVAILABLE” as status… if not … then “NOT AVAILABLE”… Please help with sample solution…

Okay I understand, can you share the Excel file to make a sample .xaml ?

Book1.xlsx (11.5 KB)

whit the .xaml that ive passed to you, you should be able to make this. But im gonna do it for you.

Let me 15 minutes

Thanks Pablo

Try run this and tell me the results @khan (11,6 KB)

It works, but… Is that what you want?

It works… but again it is same logic, which i applied… It will match just in front cell record… item1=item2. But if “A2” exact data is not available in “B2” but its available in “B4”. Then how it will search…??

No. The flow works as:

  • Get “A1” value, and this value is compared with “B1,B2,B3…BN”
  • After it takes “A2” value and is compared again with “B1,B2,B3…BN”
  • Repeat this again and again until column A has data.

Let me check again… Give me some time

I put a loop inside antoher loop, so it gonna take the A1 value, and compare with all the values of column B. After it will take A2 value, and compare with all the values of column B. After A3…A4…A5… til has data in column A.

And sure, calm down and check it out when you’d be able to do it. Just dont hesitate in ask the doubts.

Thanks Pablo…Its working fine… If I want to give status “Not Match” for those records which are not present. Then how i will do ??

Your welcome, and for not match, you can do it in different ways. For example i will check the empty values of the column and then, if its empty, write not match.

Also yoy can put not match in the false case of the if and also, if you do that, you will have to make a loop exit when a match is found. Because if you dont do that, maybe some value match with another, but in the next compare will be different so all the matches would be not match.

Hope you understand. Im sorry for write mistakes, im with my phone.

Hi Pablo… I tried the “ELSE logic”… But its not working… Could you please send add and semd me that “Empty” Logic. Thanks a lot In advance.

I will be very thank full for you

I will but it has to be the monday

Thanks Pablo… I will wait fro your response…