I want to use VLOOKUP formula in my excel sheet and autofill for entire row.
I want to create a new column in the Workbook_1 called “col 2” and VLOOKUP the “col 1” in the Workbook_2 file.
I don’t want to use macros as it would require change in extension. Looking forward for a solution.
I want to apply LINQ query for VLOOKUP in column 3 ( need to add this as new column ) of file1 by matching the values from Sheet2 of file2 in table range $A:$B for 2nd column which is col B.
1.Read range
2.Assign: i = 2 (Int32 Variable)
3. For each row in DT
3.1. Write cell activity: Cell= “C” + i.ToString / Text: “=VLOOKUP(A:A,‘C:.…Sheet2’!A:B,2,0)”
3.2. Assignt: i = i+1
Hello @ppr - Thankyou for your great support.
However, There is a if condition that I want to add in this which is,
if the value matches, then it will add it to the new column and if it doesn’t match then it should fill blank. As VLOOKUP works in this way only.
(From d1 In dt1.AsEnumerable
Join d2 In dt2.AsEnumerable
On d1(0).toString Equals d2(0).toString
Let ra = d1.ItemArray.Append(d2(“Comment”)).toArray
Select dtResult.Rows.Add(ra)).CopyToDataTable