I’m looking for help with regards to this data table sorting which I’m having issues with. Data Table .xlsx (10.7 KB)
Attached is the Excel which contains the problem stated and the ideal end result.
To sum it up, I need the data table to be filtered based on a few rules, and I hope that this can be completed with vb.net but it is not my strong suit.
I appreciate any help and thank you for your time!
Thanks for the solution! Most of the result looks great but for the results of “Annie” and “Paul” the filter seems to take the highest level’s date, would it be possible to just take the first line of the record as it coincides with Scenario 2 and should output the first line of the personnel’s record respectively
There might be non-datetime string including empty. So can you check if all the data is DateTime or not? If not, can you share how to handle it (for example ignore it) ?
To isolate cause, can you try to set break point at the AddDataRow, then check content of Date column in the datatable at Locals panel when stop there in debug mode? (dd/MM/yyyy style, any other style or mixed)
I checked the excel and cleaned up again. I tried running the original line of code with CDate, however it seems to be taking the header as a string? Maybe I could work from the original line of code if I could circumvent this issue?
First, can you check if AddHeaders option of ReadRange activity is True?
If it’s already true, can you share your settings of ReadRange and your worksheet?
It seems strange…
Can you check content of the datatable just after ReadRange activity? (give it a try to set Breakpoint just after ReadRange then debug run)