Count the repeated cells excel

Good afternoon !
Guys, I need some help, I have a Lookup Data Table flow.
flow that queries the orders and returns the invoice number, however I want it to count and notify the order numbers for each invoice.

example “invoice 000001 quantity 2 orders”



Hi @Luan ,

Would you be so kind as to include a sample data set so that we may be in a better position to assist you?
You just wish to retrieve a count of invoices and display then in a message box, correct?

Kind Regards,
Ashwin A.K


Hello, the query data table flow, use this query worksheet (reading interval), it returns the invoice number in the message box, idea that it returns the amount of repeated invoice.

this is idea

I can bring the invoice number but I can’t count these repeated numbers where I’m stuck

Maybe Following Lookup Dictionary will help you

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

(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

and type of variable?

this is the datatype


it’s failing because of GerericValue

we cannot refer to all the details, but it seems that the variable representing the datatable with the data from excel after read range is not used when within the LINQ ectractSaida2 is used.

Ensure that the right datatable variable is used and adopt the LINQ


change type of Lookup Data Table and solved the problem of the assign, but the Lookup Data Table does not run

when variable is changed to GerericValue assign does not work




(From d In dtData.AsEnumerable
Group d By k=d(0).toString.Trim Into grp=Group
Select t = Tuple.Create(k, grp.Count)).toDictionary(Function (x) x.Item1, Function (x) x.Item2)

find starter help here:
dictLKGRPCount_GroupBy_1Col.xaml (7.1 KB)

I’m not able to transform into int32


refer back to the screenshot: dictLK(“A”) is giving us the count for A: 2 as int32

it looks that you have done someting like dictLK.toString in the message box, rigth?

this will not work. An inspection like this we do while debugging and using the different panels

Understanding the 6 Debugging Panels of UiPath in the easiest way possible! - News / Tutorials - UiPath Community Forum

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