Sum data Excel without duplicate rows

Dear all I am facing with an issue plz help me to solve this,
I have an excel with duplicate data. In column A I have Reference Number and in column O I have Amount.

I need to get the sum of Amount with respect to the duplicate Reference Number.

Reference Number. Amount
ABC. 67
ABC. 67
Vgf. 1
Vgf. 1
So from the above example my sum of Amount must be 67+1=68.

How to get this. Please help me :pray:

Hi @hanviprebday ,
Could you share your simple file
I will code detail for you
It’s too easy
we filter data then calculate sum
I have created sample file similar with your mean
this’s my in/output
please check it
my source (9.1 KB)



How about the following expression?

dt.AsEnumerable.GroupBy(Function(r) r(0).ToString).Sum(Function(g) g.Select(Function(r) CInt(r(1))).First())

Sample (2.7 KB)