How to update a data table data inside the for each row

i have a excel master sheet:

i am using this data and checking if repeated

“Part description column data” and “Pos” is different then
i need to export the data into anthor sheet and need to delete the records here.

data is deleting here but after deleted the records. those records are i dont want to shift up because this delete functionality in side the for each row.

now i am facing issue those empty row is deleted but data table is not updating with empty cells so and trying to comparing previous records.

this is screenshot :slight_smile:

u can find the array is trying to search with deleted records.

FindingMisatchedDataScenario2changing.xaml (43.8 KB)

WritingFilterdData.xlsx (40.6 KB)

kindly help me.