Comparing two Excel sheets and displaying in message box

I want to read a list of names in a sheet and then compare it with another sheet with listed names. Then I should display the Email IDs of the matched names.

How can I do this using reframework ?

As I’m a new user, I can’t upload more than one file.

You access the screenshots via the link attached

Hi there @jijorhohim98,
I trust you are well!

You should be able to achieve this via the below:
Assign - dtCompared = dtOne.AsEnumerable().Where(Function (drRow) drRow.Item("NAME").ToString.Equals(dtTwo.AsEnumerable().Any(Function (drRowTwo) drRowTwo.Item("NAME").ToString)), StringComparison.InvariantCultureIgnoreCase).CopyToDataTable

dtOne = DataTable with Schema Name, Email
dtTwo = DataTable with Schema Name, ID

Unfortunately, I do not have access to Studio at the moment, but will validate the above when I can.

This should result in a single DataTable, where Rows with matched Name values exist, alongside the Email.

You can then output the Emails within a Message Box using:
For Each row in dtCompared
Message Box - row.Item("EMAIL").ToString

Please let me know if you have any questions.
Thanks once again for your support,

dt1.AsEnumerable.Select(Function (x) x("Name").toString.Trim).Intersect(dt2.AsEnumerable.Select(Function (y) y("Name").toString.Trim)).toArray

I’m a beginner. So I’m looking for a step by step procedure.

Thanks for your effort.