I need help comparing 2 excel files

I have two Excel files, each consisting of ten columns with similar headers and a considerable number of rows. I wish to compare the values in column “A” of both files. If the second file has matching values in column “A” with the first file, I would like those cells to be colored “Green.” Furthermore, if the second file contains any new values in column “A,” I would like to change the color of those cells to “Blue.” All modifications will be made to the second file. What is the most efficient way to proceed with this?

Thanks,

Hi @harsh2,

Please refer below threads:

Please note: You might have to do few tweaks to get the color coding, but following these threads, you should be able to develop a solution to do the comparison.

Regards
Sonali

1 Like

I already checked this but it didn’t help moreover I need help with color as well.

Thanks,

@harsh2,

Did you try using two for each activities.

Hi @harsh2 ,

you can below steps to get the solution,

1.Find the Matched data from two excels and prepare one new datatable.
2.loop output datatable, and whatever the items you get check those names with 2 excel data, check whatever the matched items and apply the color for remaining you can set another color based on your requirement

1 Like

Hey @harsh2 for this logic use 2 read range and save their output in dt1 and dt2 now use two for each row and inside for each use one if condition and inside if pass if currentrow1 = currentrow2 → in then branch use set color range or for comparing you can this logic also for this logic you dont need two for each.

dt1.AsEnumerable().Where(Function(r)r(2).ToString().Trim=CurrentRow(2).ToString().Trim)

1 Like

Hi @harsh2

Please find the zip folder contains 2 excel dummy files. matching the data in A column from both the excels and adding colour in excel2 file for the data matching in excel1 file.

Excel Data.zip (48.7 KB)

Thanks!!

1 Like

Hi, Sorry for the confusion I wanted to to something like this :

File1 :

File 2 :

Result :

Hi @harsh2

Take a look on this workflow with your required output.

Excel Data.zip (63.4 KB)

Thanks!!

Thank you @sarvesh.b ! I appreciate the help.

1 Like

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