Search for matching numbers and extract to another DT

Hi guys,

I have a long list of invoices and credit notes extracted to Excel and I need to be able to exclude postings that match (settles to 0) to only see open postings. Only indicator I have is the amount which of course is one positive and one negative, no other numbers match.

Below there is a screenshot with two rows settling each other marked in red. I would need to find and export these two whole lines into another DT.

Only thing I can think about is a for each row which gets the row item and looks up “matching” values in rest of the DT, but can’t really see how it would work…

Any help is appreciated. Thanks!

Book2.xlsx (11.4 KB)

Hi @stch

Use Assign Activity with New Dt=Datatable.Select("[Voucher]<>’’ or [Date]<>’’ or [Amount Currency]>0").CopyToDatatable()
Have a try :slight_smile:

Ashwin S

Hi @AshwinS2,

Thanks for your suggestion. Not sure what the intention behind that is, are you suggesting splitting the lines into two different DTs (one for negative values and one for positive values) and then comparing these DTs?

Hi @stch
yes need to split before the activity

Is my suggestion correct @Palaniyappan or @lakshman
Ashwin S


As @AshwinS2 said, that will be good idea. After splitting into two different datatables and then you can ignore that minus sign and compare both amount values in two different datatables. If it is matching then it was found else not.