In “Criteria” = “RD” , Group columns AB,AC,AD,AE,AF
After grouping if the string has found duplicate rows then assign 1st row according to master and rest as “go”
if string is unique then assign value according to master sheet
In “Criteria” = “DD”, Group columns AB,AC,AD,AE,AF
After grouping if the string has found duplicate rows then assign 1st row according to master and rest as “go”
if string is unique then assign value according to master sheet
Here, in the output sheet – rows colored orange shows duplicate and in grey area shows non-duplicates.
Please help … how do i update the status accordingly.
clone dtOutput from dtInput , add the result column
use the master data for lookups in the form of a dictionary
LINQ, doing the job:
iterate over dtInput
group data with the help of the concat trick
order groups by its first member position in original datatable
lookup the value from master
use lookup or go for constructing the target itemarray
add the constructed rowArray to the target Datatable
return the count of added rows
we do return the count in order to return anything (so called silly trick). As rows.add already adds the data, we do not need selectmany, copytodatatable
The order differs from your sample sheet, but the order requirements were not derivable from it.