In case you want Sorting as Case senstavie then you can make it 'True'Ĭustom Sorting:In custom sorting we do the sorting on the basis of a list of Values. '- It is better to put MatchCase as False. '- If it includes the header row as well then put. '- Select the Range on which you want to perform the Sort. With ActiveWorkbook.Worksheets('Sheet1').Sort
Order:=xlAscending, DataOption:=xlSortNormal This is important otherwise sorting will not take placeĪctiveWorkbook.Worksheets('Sheet1').ĪctiveWorkbook.Worksheets('Sheet1'). Key:=Range('I8'), SortOn:=xlSortOnValues, _ '- Now clear the Sort fields before sorting. '- First Select the Range which you want to sort Simple Sorting: Simple sorting is nothing but sorting alphabetically or by number in ascending or descending order. But here we are going to learn how to do sorting using Excel VBA/Macro. Sorting : In Excel Sorting can be done easily manually.