Count items in column

Hi Everyone.

I want to count how many time items appear in column A & B as picture below.

Example : item " abc " appear total is 3 & “aaa” total is 3

Pls kindly support me with a XAML file.

Thanks in advance!Count.xlsx (8.3 KB)

Hi @trunghai
You can use Select method to get the count

DataTable.Select("[ColumnName] = ’ “+ValueToFilter+” ’ ").CopyToDataTable.Rows.Count.ToString

JothyPrasanth M

1 Like

Hi @jothyprasanth.m

Sorry, but I want to copy result after count to position where highlighted as below picture.

Could you pls do a XAML file ?

Thanks you! (17.5 KB)

^ open excel first -> understand it -> then run the program :slight_smile:

1 Like

Hi @wija

Thanks you so much ^^

But has small issue as below picture…

oh i zip the wrong one, wait

it’s because in the filter… numer is no need “”

wait i send you the correct one. (17.0 KB)

why your result for 333 = 0?

Hi @wija

The result still = 0 for 333 ^^

I don’t know why… Could you fix this issue ? ^^

Thanks you!

check the filter data table activity (filterCode3) -> check if “code 3” = 333 -> if still 0 as result, change to “code 3” = "333"

mine works fine by using “code 3” = 333

Hi @wija

I have changed something but the result still same for 333

this is weird, i don’t know what is wrong because in my laptop all works fine.
my result for 333 = 4 not 0

but in your case…, if you don’t using number as code… it means my workflow helpful for you right? mark as solution if so.

1 Like

Hi @wija

Thanks you so much!

I will raise another topic about this issue ^^

1 Like

for information.
my friend already tried my workflow too and work fine.

something weird in your excel / uipath studio. i don’t know.

1 Like

I have tried on another PC but the result still same :frowning:

omg :frowning:

hi @wija

I have used another way to do this case ^^

Thank you for your way…i will study about it ^^

i see, nice!

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