How to Sum column values in Excel

Hello All,

In Excel based on the condition if Customer ID is the same then The column Value should add together.

For Example, If Customer Id is 36908 is repeated then It should add a column value(23+65+12).

Can someone please, suggest How Can I achieve this

Thank you in advance


Hi @nithya

Please refer this post,


Thanks, @prasath_S
Any suggestion for this ,

If Sum value is greater than 100 then, the entire row should be written in a new excel

Example — Customer ID, Value, Mail



giva try on on:

  • Assign Activity
    LeftSide: dtResult | DataType: DataTable
    Right side:
    (From d in YourDataTableVar.AsEnumerable
    Group d by k=d(“Customer ID”).toString.Trim into grp=Group
    let s = grp.Sum(Function (x) CInt(x(“Values”).toString)
    Where s >= 100
    Select grp.toList).SelectMany(Function (m) m).CopyToDataTable

For handling empty result in a defensive way we can use following pattern:

It encountered an error, Pls find the attached screenshot

can you please recheck your implementation with the code from above. Thanks
refer to the part grp=Group