Hello, I have been trying to find a solution to merge cells with the same value in excel, without using Macros, kindly Help
Hi @Jasmeet_Singh1, it’s a best practice to give us an example of how your data looks and how what your expected outcome is. It avoids misunderstanding and resolves issues faster.
Did you mean you want to Group By? example
Input data
Column1 Fred John Fred Sam Fred John
Expected Output
Column1
Fred
John
Sam
If this is what you want then we can use the below code
(From p In DT1.AsEnumerable()
Group By col1=p.Item("Column1").ToString Into grp=Group
Select grp.Last() ).CopyToDataTable
Try and let us know the result.