How i can group value in excel

Hello Everyone

I need help, please.

I have 3 columns Mark, Name, and Class.

data in mark and name it can change but class is fixed.


I try to create like this result


could anyone help me, please

Thank you.

Hi do u need to create the results in one cell for A, B , C seperately ( results )

Hi @NIVED_NAMBIAR it is okay. the idea is I need to get the name with a mark one by one. the issue is how the boot knows if there is now more value in the first name.

Hi @Dev2 ,

I’m a beginner in LINQ. I hope my solution fits your requirement.



dt_Output =
(From d In dt_Input.AsEnumerable
Group d By k=d(“Name”).toString.Trim Into grp=Group
Let row = New Object() { k + vbCr + String.Join(vbCr, grp.Select(Function ( r ) r(“Marks”).toString.Trim).toArray) }
Select dt_Output.Rows.Add(row)).CopyToDataTable

Workflow (With All Files): (71.3 KB)


Hi @Dev2
check this workflow
sample.xaml (9.9 KB)


Nived N
Happy Automation

1 Like

Hi @Shraddha_Gore

Thank you for your help, it is helpful. But how I can process it one by one. For example, first I want to get A, with 90 and 35, and process. Then next value etc…


I will check

1 Like

Hi @Dev2 ,

As per my knowledge, it is already processing one by one group.

As I’m grouping by Name (A, B, C, etc).
So, first we have A.
String.Join(vbCr, grp.Select(Function ( r ) r(“Marks”).toString.Trim).toArray gets Marks one by one related to A (group item) & joins each item with new line seperator. Similarly , it continues for other groups (B, C etc.)

1 Like

@Shraddha_Gore Thank you for your help :innocent:

1 Like

Thank you @NIVED_NAMBIAR .

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