Same ID but different no condition in excel how to add and select from other sheet?

Hello i have created a excel table where i want to add them together but however due to they are the same ID but different no the add method is different but how can i write that for uipath in such case and put into the Total Amt in such case ?

The sheet are in the same excel but different sheet
So this is my test file
The same ID but however the No are different


This is my test excel file
Book4.xlsx (10.4 KB)

Hi @xxGoRpa ,

Can you please explain the requirement more clearly so that we can give you some solution.

Thanks

Hi sure what i want is the output for the total amount based of the No as they are in the same number however if they are not then for sheet 1 the no total amount will be different

Read the file in dtResults and try with below query

dtResults = (From dte In dtTable.AsEnumerable
Group dte By col1=dte(0).ToString.Trim Into Group
Select dtResults.Rows.Add({col4, Group.Sum(Function (x) CInt(x(4).toString.Trim))})).CopyToDataTable

Thanks

1 Like

this query do i use assign to do ?
Any sample for how i write in Uipath ?

Test.xaml (6.9 KB)
I use the read range and store in Dtresults but i got confused with the rest