You have been given following data and you sort this data in Excel and you were expecting that lowercase will be sorted before uppercase. But Excel is sorting on the basis of FIFO i.e. First In First Out for the same alphabet. Hence if A is coming before a, it will get sorted as A, a not as a, A.
The reason is that Excel's default sorting is case-insensitive.
To perform the sorting which you need, you will need to make it case-sensitive.
1. Select the range of data which you want to sort.
2. Data tab > Sort
3. Options > Check Case Sensitive to give you the result which you want.