Combine data in datatable

Hi ,
I have the below input data:

I want the data in the below format:
Data_Format.xlsx (8.5 KB)

Hi @Yoichi ,

Any inputs from your end would be of great help.

Using lookup we can able to get the data & write in excel


Hope the following helps you.

dtResult = dt.AsEnumerable.GroupBy(Function(r) r("Name").ToString).Select(Function(g) dtResult.LoadDataRow({g.Key,String.Join(vbcrlf,g.Select(Function(r)  String.Format(strTemplate, {r("Layer").ToString,r("Name Code").ToString,r("Percentage").ToString,r("Certificate Number").ToString})))},False)).CopyToDataTable() (9.0 KB)


I have additional requirement . I have attached the excel for your reference . If for a intermediary there is same layer multiple times the the layer name should exist only once. Please refer intermediary 1 layer 1 in the attached excel
Data_Format.xlsx (8.6 KB)
result.xlsx (9.1 KB)


How about the following? (21.9 KB)


1 Like

Thank you @Yoichi . It worked… :slight_smile:

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.