Linq query to update Matched rows in same datatable using LINQ

How to update based on below Input if 2 values not matched
For Eg:
have to get 1st 2 items compare and update the status
then take next 2 items and match then update like that goes on

Input
Cust ID Status
1846529
1846529
1974783
1974782
1974783
1974783
1974683
1874683
Output
Cust ID Status
1846529
1846529
1974783
1974782 Not Matched
1974783
1974783
1974683
1874683 Not Matched

Hi @Aravinthan
i am not cleared with your question, can u explain it better with output u need finally?

have to get 2 items match and update the status
take 1st 2 items and match then next 2 items like that goes on

Hi @Aravinthan ,

I had tried this way

taking the sample input sheet

image

used this workflow

got this output
image

Attaching the workflow here
process1.zip (3.4 MB)

Regards,
Nived N
Happy Automation

pprPeter | MVP For this scneario i have tried below linq query but how to increase the increment in the query so it will compare 1st 2 rows and then next 2 rows like that
(From i In Enumerable.Range(0,dtData.Rows.Count-1)
Let row = dtData.Rows(i)
Let chk = dtData.Rows(i)(“CUSTID”).toString.Trim()<>( dtData.Rows(i+1)(“CUSTID”).toString.Trim())
Let col=dtData.Rows(i+1)(“CUSTID”).toString.Trim()
Let upd = If(chk,“Not Match”,“”)
Let ra = row.ItemArray.Append(upd).ToArray
Select dtResult.Rows.add(ra) ).CopyToDataTable

Cust ID Status
1846529
1846529 Not Match
1974783 Not Match
1974782 Not Match
1974783
1974783 Not Match
1974683 Not Match
1874683