Sorting Excel Sheet by Rows and Creating New Sheets Per Unique Value

Hi,

Hope the following sample helps you.

dict =dt.AsEnumerable.OrderBy(Function(r) r("Name").ToString).ThenBy(Function(r) r("Squadron").ToString).GroupBy(Function(r) r("Squadron").ToString).ToDictionary(Function(g) g.Key,Function(g) g.CopyToDataTable)

Sample20221122-3.zip (10.4 KB)

Regards,