Help me to fill the missing data in the Data Table with the preceding values of the cell in a specific coloumn

Hi Developer,

I am having a requirement as below.

Havng a DataTable Dt1
in a column we have 50 rows, out of which some values are empty.
If the third row is empty it has to be filled with the second row value.
If the 30th row is empty it has to be filled with the 29th row value and etc.,

It should not disturb the other coloumns, Consider we have to apply logic for the first column.

Please do help me with the logic :slight_smile:

Thanks

Like this:

Processusvierge.zip (8,4 Ko)

1 Like

Hi Anthony_Humphires,

I have seen the excel, yes it is good understanding.

Output should be
1
2
2
3
4
5
5
5
6
7
8
8
9

At the same time, the workflow you have provided is not opening because of the version of the Studio
Could you please post the logic here if you don’t mind.

Thanks in advance :slight_smile:

Read Range into DtData
For Each Row
If String.IsNullOrEmpty(Row(0).ToString) AndAlso RowIx <> 0
Assign Row(0) = DtData.Rows(RowIx - 1)(0).ToString
End If
End For Each Row
Write Range into DtData

1 Like

Thank you its working :slight_smile: