Copying particular set of data from 2 unequal sized excels


#1

Hi there,
I am trying to copy data from 2 unequal sized excels in to one
excel 1 has columns dept and name.
excel 2 has columns department, name and salary
excel 3 has columns dept(excel 1), name(excel 1), salary(excel 2)
excel_1.xlsx (8.9 KB)
excel_3.xlsx (8.0 KB)
excel_2.xlsx (9.0 KB)
main4(Autosaved).xaml (30.8 KB)
Can someone please point out the error


#2

You’re basically doing a VLOOKUP but using a DataTable. I like to use the DataTable.Select() statement for this as it tends to be quite fast. See sample solution attached.

Combine-Excel.xaml (10.7 KB)
excel_3.xlsx (8.6 KB)


#3

You made the entire thing so short and sweet.
Thank you so much!!