I want to get few cell values based on another cell value in excel

Hi Folks,

. In attached screenshot, Photo1_A2.jpeg - A2 cell will be my input in sheet 2 and using that input A2, i want to search that input value whether it present in sheet 1 (PhotoA2_E8.jpeg). if it is presented in sheet 1 then i need fetch few cell values in that row. so can you please help me on this… i am new to excel related activities.
Thanks in advance. :slight_smile:

Hi @baalajee_k

Using 2 for each for Dt1 and Dt2 as row1 and row2,
When match found in row1 data with row2
then in assign use row2 varible to fetch all data from 2nd Excel.

like row2(column_index).toString or row2(“Column_Name”).toString


you can use this condition inside for each loop
not row.ItemArray.ToList.IndexOf(“G410717224”).ToString.Equals("-1")
here -1 represents that G410717224 is not present in that row. So we did a not to make sure we extract value only when the G410717224 is there in the row.

in then part you can use this to index of that value!
row.Item(row.ItemArray.ToList.IndexOf(“G410717224”) + 1).ToString

cheers @baalajee_k