I have an scenario where the dates and serial numbers are in a single column.
I have to arrange the dates in a order where serial number should be replaced by the date in the upper cell.
I have tried an if condition logic but my file contains 30000 records. So it is taking too long to complete.
I have attached file for reference
Thanks in advance.
Test.xlsx (226.8 KB)
How about using InvokeCode as the following?
Dim i As Int32
Dim m = dt.Rows.Count
Dim previous As Object
If DateTime.TryParse(dt.Rows(i).Item(0).ToString,Nothing) Then
previous = dt.Rows(i).Item(0)
Sample20231007-1aL.zip (176.1 KB)
Try this in invoke code where dt is to be passed as in/out argument and dt1 the same datatable as only in argument
Dt.AsEnumerable.ToList.ForEach(Sub(r,i) r("sr no") = If(r("sr no").ToString.Contains("/"),r("sr no").ToString,dt1.Rows(i-1)("sr no").ToString))
Hope this helps
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.