Excel.Worksheet sheet = (Excel.Worksheet)xlWorkBook.Sheets[1]; sheet.Sort.SortFields.Clear(); sheet.Sort.SortFields.Add(sheet.Range["E13:E100"], Excel.XlSortOn.xlSortOnValues, Excel.XlSortOrder.xlAscending, Type.Missing, Excel.XlSortDataOption.xlSortNormal); sheet.Sort.SortFields.Add(sheet.Range["D13:D100"], Excel.XlSortOn.xlSortOnValues, Excel.XlSortOrder.xlAscending, Type.Missing, Excel.XlSortDataOption.xlSortNormal); sheet.Sort.SetRange(sheet.Range["A13:AP100"]); sheet.Sort.Apply(); xlWorkBook.Save();
= IIF(A1="GV",1,IIF(A1="BU", 2, IIF(A1="GNYE",3,4)))
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)