Count the repeated cells excel

Maybe Following Lookup Dictionary will help you

Assign Activity
LHS(left field) dictLK | DataType: Dictionary(Of String, Int32)
RHS:

(From d in YourDataTableVar.AsEnumerable
Group d by k=d("invoice").toString.Trim into grp=Group
Select t = Tuple.Create(k, grp.Count)).toDictionary(Function (x) x.Item1, Function (x) x.Item2)

dictLK(“2384305”) will return 2 as an Int32 Value

1 Like