Excel Manipulation with Filter

Hello Everyone

I’m automating a process that uses excel file. What I wanted to achieve is to check if the first record/row and the succeeding records/rows have the same combination. For example…

Column filters/combination (ID – Name – Age – Work)

ID – Name – Age – Company – Work
1 – James – 20 – Company A – Dev
1 – James – 20 – Company B – Dev
2 – James – 20 – Company C – Dev
3 – Merlin – 20 – Company C – Dev
4 – Merlin – 20 – Company C – Dev

In this sample, I want to identify or output the records that have the same combination of (ID, Name, Age, and Work) and that do not have same combination as well.

Expected output

ID – Name – Age – Company – Work
1 – James – 20 – Company A – Dev (treated as one)
1 – James – 20 – Company B – Dev (treated as one)
2 – James – 20 – Company C – Dev (tread as independent)
3 – Merlin – 20 – Company C – Dev (tread as independent)
4 – Merlin – 20 – Company C – Dev (tread as independent)

@Callos_James_AU

Try below expression.

       newDT = inputDT.Defaultview.ToTable(True,"ID","Name","Age","Work")
2 Likes

Hello @lakshman Thank you for this! I’m gonna try this out and let you know! :slight_smile:

1 Like

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