I have an ASCII file and this I do the conversion from excel and I separate it by spaces or also with commas.
But I want to filter only some data with all its row that have a common pattern (9999) and based on this create a new table that contains the previous data and at the end do a summation of the time. This is an example of my table:
Fecha, Tiempo, Error, Dato2,Dato3
21092016, 07:09:50, 5.2, AA, BB
21092016, 07:10:30, 9999, AA, BB
21092016, 07:11:50, 4.2, AA, BB
21092016, 07:12:10, 5.2, AA, BB
21092016, 07:15:20, 9999, AA, BB
21092016, 07:17:53, 9999, AA, BB
21092016, 07:18:10, 5.2, AA, BB
21092016, 07:19:00, 4.2, AA, BB
I could make a dynamic table, but the curious thing about this filtering is that when I pull the row that contains 9999 I want it to also filter the next data that does not contain 9999 bone (4.2 or 5.2 or less than 9999). This in order to count the time it took that error that would be more or less as it should look the final table:
Fecha, Tiempo, Error, Dato2, Dato3, TiempoError
21092016, 07:10:30, 9999, AA, BB, 00:01:20 (Resta 07:11:50 - 07:10:30)
21092016, 07:11:50, 4.2, AA, BB, -
21092016, 07:15:20, 9999, AA, BB, 00:02:50 (Resta 07:18:10 - 07:15:20)
21092016, 07:17:53, 9999, AA, BB, -
21092016, 07:18:10, 5.2, AA, BB, -
21092016, 07:20:10, 5.2, AA, BB, -
21092016, 07:21:10, 4.2, AA, BB, -
TOTAL TIEMPO ERROR: 00:04:10
What logic would help me detect the next data, after a 9999? What do you recommend doing, programming c # for csv? Macros excel? Dynamic tables?
I would really appreciate it! Greetings