Are you wanting all the rows that meet your criteria of starting with Tree and ending with a number? You could do this by using the Where and Select functions from the datatable which will create an array of rows which you can then process.
with dt as your datatable variable:
dt.AsEnumerable().Where(Function(row) row(0).ToString.Trim.StartsWith(“Tree”) and IsNumeric(Right(row(0).ToString.Trim,1))).Select(Function(row) row).ToArray()
(From row In dt.AsEnumerable() Where row(0).ToString.Trim.StartsWith(“Tree”) and IsNumeric(Right(row(0).ToString.Trim,1)) Select row).ToArray()
Instead of Right() you could split by space too like IsNumeric(row(0).Split(" “c)(row(0).Split(” "c).Count-1).ToString)
if .Last works then you could use that instead of .Count-1
I’m not 100% sure on the syntax.
That will return an array of DataRows which you can adjust the values of or run through a process.