Find the duplicates and get respective values in dictionary

Hi team,

image

I need help in the above in the above input excel file like,

my output should be like this : {A1:100,300} and {B1:200}.to get in dictionary format.

Could you guys advise me on this please!!!

for each row in DT,
try
{
Get Dictionary Value (pass field value as key here)
if no value in dictionary ,
Add to Dictionary Fields: Column-0
else
Append new Column0 value with existing dictionary value
Add it again to dictionary with same key.
}
catch(Exception)
{
Add to Dictionary Fields: Column-0
}

Thanks @ArunVelaayudhanG

But this one not helped me sorry for that !!!.
Then, see firstly i need to find the duplicates and i have to pass that as the key like A1 is key because it was the duplicate value here in this excel. And respective to duplicate values i need to get the data from column-0 say here 100 and 300 for A1 as common. then i have to pass this as values for that key so i can easily process the values with keys when i handle the large data in excel file…

help me on this…

have you tried?

Brother @ArunVelaayudhanG in this use case main case is to find the duplicates and get the appropriate value from column-0 using if condition and for each row but i am not able find this in your code. firstly that is important for me to solve the first step.
And also this A1…those values in fileds are for sample only it can be anything string,int and any dt so we have to sort it out by dynamic only.

So please guide me on this…