Many of us code monkeys use excel from time to time to do various tasks, and for me it usually involves thousands of lines of phone calls from our CRM software’s database. So the process for me typically is as follows: go into said CRM software, export to a csv file, import said csv file into excel.
The data source you are using is irrelevant, but this type of thing seems to happen when importing data from an outside source. I will explain why this happens, and tell you how to solve the problem. When you import the data from a csv file, you sometimes have blank columns. When you then click on a column to sort it, and there are blank values or especially when there are entire rows that are blank, excel will only sort the column you have clicked on, without expanding the sort across the entire data set. This is usually bad, as you have now sorted a column but all the other columns don’t match the one you have sorted.
The solution to this is after you import the data, click the top left corner to select the entire sheet, and then click sort. This will effectively filter out all the blank data rows. Now that there are no blank rows, you can click on any column you wish, and click your desired sort method. It will now ask you to expand your sort, which is what you wanted.
