How to extract row values based on particular column name

PFA
I have two sheets
Sheet1:


It contains Inet Account Number Column
Sheet2:

Sheet 2 contains Partnumber, Qty, Inet Account Number columns

I have to fetch each Inet account number from sheet1 & search in sheet2 where exactly it was available if it was available I have to fetch the part number, Qty values w.r.t Inet Account number like this

Thanks in advance

Hey @rsr.chandu ,

From Sheet2 column Inet Account number you have to manipulate it to get the actual Inet Account number like 51741G instead of 51741G - Centre Les services Montreal.

Once it will be done you can do the left join to get the partnumber from Sheet2.

Thanks,
Sanjit

1 Like

Hi @rsr.chandu ,

(from s in dt2.AsEnumerable from r in dt1.AsEnumerable where Split(s(“inet_account”).tostring,“-”)(0).Tostring.Trim.Equals(r(“iNet Account Number”).Tostring.Trim Select s).CopyToDatatable

Try this.

can you provide sample file
and also is it going to be exact 4 parts for all type of products
and in same format
and you are expecting 4 rows corresponding to the account number right?

Please mention the output format as in (string or datatable or any disc )

Regards