Hello All,
I have two excel files in which one file has policy numbers with duplicates and other with unique values. So I need to count the policy numbers in duplicate file. Please help me with this.
Hi @ISBS_ROBOT,
I assume that both files have a column for the Policy Number?
You can try reading both files and then iterating through them. Please see the below pseudo as an example:
For Each OuterRow in Table1: // This would be your file of unique ones
For Each InnerRow in Table2: // This would be your file of duplicates
If OuterRow("Policy Number").ToString = InnerRow("Policy Number").ToString:
Then:
MatchingCount = MatchingCount +1 // This is your integer for counting duplicates
Break
Else:
Do Nothing
Corp_Filter.xlsx (227.8 KB)
Sheet Output has Policy No and the same within Sheet1. Calculate the count of that policy numbers
can you explain more what you want
dt1.AsEnumerable.Select(Function(x) x(“POLICYNO”).ToString).ToArray.count
dt2.AsEnumerable.Select(Function(x) x(“POLICYNO”).ToString).ToArray.count
gives you the count
cheers
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.