Compare 2 columns in same sheet and write into new sheet

hi,
i have excel sheet , i want to compare two columns(A,B) in same sheet. if both matched and not matched write into separate sheet . how can do it
can anyone help this ?

compare_Dt.xlsx (14.4 KB)

Hi @Anand_Designer

Please use the below method to compare two columns.

dt.Select("[A]="+dt.Columns(“B”).ToString+"").CopyToDataTable

After this use write range to write the output in another sheet.

Feel free to reach us at any time if you have doubts. Thanks.

Happy Automation

it is not working filter… getting same old data.

You are getting the whole values? I can’t understand what you are meaning.

I have attached the below screen shot for your reference.

Thanks.

thank you @vignesh.ks before it come unfilter data. now its working fine.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.