Sorting EXCEL using 2 columns


I have excel data in 2 columns. First column is Name and other column is Subject. Name could have repeated values i.e. this table will have list of subjects (here only 3 - English, Hindi, Maths)for different names. So, now, I want to first sort the Name column in ascending order. And then, for all the Names (could be repeated obviously in multiple lines), I want to align subjects in order : “English, Hindi, Maths”.

Any excel formula that can be used?


You can extract it as a Data table and then use an assign activity and try this:

To: DataTableToSort
(From x In DataTableToSort.AsEnumerable() Order By Convert.ToString(x(“Column1”)),convert.ToString(x(“Column2”)) Select x).copyToDataTable