I am having 2 excel file. In Excel 1 I have (Vend Material Number Vend Id) Columns.
In Excel 2 I have (Vend Id), If vend id in excel 2 matches with excel1 Get the material number from Excel 1 and update in Excel 2.
Excel 1 :
Excel 2: (Required Output)
There are more than 10k rows, I need to find match & update without using Loop.
if you have so many rows and you dont want loop concept go with vlookup formula.
use write cell to write the vlookup formula in the excel2 A2 cell to get the Vend Id from the excel 1. After that use Auto fill range to fill the appropriate cells in the column1 of excel 2 with the Vend ID. Hope this logic will help you to achieve your requirement. Thanks.
For Each dtRow As datarow In dt2.Rows
If dt1.AsEnumerable.Where(Function(row) row("Vend Id").ToString.Trim.Equals(dtRow("Vend Id").ToString)).Count > 0 Then
dtRow("Material Number") = dt1.AsEnumerable.Where(Function(row) row("Vend Id").ToString.Trim.Equals(dtRow("Vend Id").tostring))(0)("Material Number").tostring