How to check a column for duplicate IDs, and then check another column for Payment Amount, before adding the Payment Amount for a Single ID together?

I have an excel file (A) which contains Payment ID and Payment Amount. The Payment ID column contains multiple duplicate IDs (multiple purchases). I want to be able to calculate the total Payment Amount for a Payment ID.
Afterwards, I need to compare the Payment ID and the Payment Amount to the row data in another excel file (B).
The other excel file normally contains the aggregated Payment ID and Payment Amount.
I can’t upload an example excel file as UiPath Forum won’t allow me to (I’m a new user)

Example Excel A:
Payment ID Payment Amount
1234 $5
5555 $15
1234 $10
6666 $8
6666 $8

Example Excel B:
Payment ID Payment Amount
1234 $15
5555 $15
6666 $16

Payment ID is 1234, Payment Amount is $5 (for the first entry example)
UiPath Forum seems to automatically delete extra spaces.

@YF_Leong Can you Check this Workflow :
I have Created a Sample Data you have given using Build Datatable.

You can use Read Range and get the Data in a Datatable and use that Datatable.
GroupByAndSum.zip (1.9 KB)

3 Likes

Thank you so much.
I will experiment with this to see how it fits.

1 Like

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