Thanks @Anjani_Kapoor
I’ll try to recap.
I’m talking about a huge CSV file containing about 1.1 M rows.
The data will be stored into DT0
I divide the total number of rows by 2, but I need to implement a condition for the second half, as I don’t know which will be the last category.
If : dataRowIndex < CInt(Math.Round(DT0.Rows.Count/2,0))
Then : copy dataRow in DT1
Else If : the value of the first column (of the second half) is the same as the last value of the first column (of the first half)
Then : copy dataRow in DT1
Else : copy dataRow in DT2