Get values by comparing the Name from 2 diffrent tables and write in the value in 2nd table

Table 1

image

Table 2

image

Thanks in advance

Listing a few options

  • Join DataTable Activity and processing the JoinResult
  • LINQ

also have a look here:

Maybe you can tell us if you are interessted on a inner or left join

How about lookup data table?

Hi @ManjunathReddy

You can try with Vlookup

BlankProcess15.zip (168.0 KB)

Hope this helps!!

Hi @ManjunathReddy

Read Range ‘Sheet1’ → Output to dtTable1
Read Range ‘Sheet2’ → Output to dtTable2

Assign currentName = row(“Name”).ToString
Lookup DataRow in dtTable1:
Assign matchingRow (type: DataRow) = dtTable1.AsEnumerable().Where(Function(r) r(“Name”).ToString.Equals(currentName)).FirstOrDefault()

If Not matchingRow Is Nothing Then
Assign row(“Role”) = matchingRow(“Role”).ToString
Assign row(“Country”) = matchingRow(“Country”).ToString
Assign row(“Gender”) = matchingRow(“Gender”).ToString

Write Range ‘Sheet2’ with dtTable2 (make sure ‘AddHeaders’ is checked if you want to include the column names)