ROW count with specific value

Hi everyone,

I know if i wanted to count rows I have to use “myDataTable.rows.count.tostring” and i find the number of rows but if i wanted to count rows for example until “George” the value of my excel image, how can I do that?

Screenshot_5

Thanks in advance

@salvatore.quimi

Check Attached, It will give you the count of the George, you need to pass the value you require

FindrowIndex.zip (31.4 KB)

Mark as solution if this helps you

Thanks

1 Like

(dt.rows.IndexOf((From dr As datarow In dt Where dr.item(“George”).ToString.Equals() select dr)(0))+1)

Yes , thanks is a good solution

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