Many times you'll have data that you wish to sort, and Excel has all sorts of sorting options available. I'm going to be working through a couple examples here in this file called Sort. First of all, we've got some numbers over here in column A. And if you want to sort those, the main way to do this is to just highlight those and you can go up here on the Home tab way over here in the editing group. You can select Sort and Filter. There's the first two options here are just sorting smallest to largest, so you can click on that. Or you want to do largest to smallest, you can do that. I'm going to go ahead and press control z a couple of times to get it back to the original order. We've got a column here. This is a bunch of names. Same thing, If you highlight that, go up here to Sort and Filter, you can do Sort A to Z or Z to A. So let's just sort that A to Z. So we can sort on numbers, we can sort on words. There's also a custom sort option. So this is used for a lot of different things. I'm just going to highlight these words, the quick brown fox jumps over the lazy dog. And you see we have different formatting here. We have different font color and then we have different cell color in those. So I'm going to highlight that and I'm going to show you some other options available. So let's go up here to Custom Sort. So it brings up this box here. And this is where we can customize the sorting that we want to do. The most important thing here, make sure that this box here is selected, whether or not you have data headers. So this column, actually, we don't have data headers. We don't have a label on top. So I'm going to unclick that, because we wannna include that top cell there. And then we can determine, it's obviously going to sort by column G because we only have one column. And here's where you can sort on Cell Values. So we can sort alphabetically, but I want to show you how we can also sort by something like the cell color. So here we have green and empty, and it brings up this. It detects all the different cell colors in that column and then I can select on here. So for example, I could do green is going to be on top or on bottom. So let's just put the green cells on the bottom. And then I can click OK, and it just sorts through those cells. I could also go up here and we can custom sort by not cell color, but by font color. And it detects the different fonts that are in that column. And I could do our automatic, which is the black or the red. So maybe we want the red on the top, so we could go ahead and do that. Now that changed the previous formatting, the previous sorting, because I had previously sorted the green boxes down below, but now it brings all the red ones up to the top. I want to show you how we can apply two criteria. So maybe we want to sort first on Cell Color. So in this case, let's put green on top, but then you can add a second level. So let's go ahead and add a level there. So it's going to sort by cell color, put those on top, but then secondarily it's going to sort by, let's just do cell values and let's alphabetize. So now we're doing two things. We're sorting by cell color, but then of the remaining blocks, the green cells and the empty cells, we're going to sort alphabetically. And so we put all the green cells on top and of those green cells we alphabetized. And then of the non highlighted cells, we sorted those alphabetically. So you can kind of have layers on there. A lot of times you'll have data that's linked together and you don't want to sort independently. We could if we wanted to, we could sort this column independently, but in this case, we want to keep the data that's in these rows together. So we don't want to independently sort the name from years of experience from the entrance exam score. We want to keep all the data in rows together. Another really important thing to do if you're sorting data, these sorting tools will permanently change your worksheet. If order really matters, what we can do is right click and I can insert a column here and I might just put a order label and then I'm just going to put 1 through, I think we have 10 here. That way later on if I wanted to, I could go back and I can sort by that first column. So let's go ahead and I'm going to highlight this. Now know you can do the same thing by using an Excel table. So if I converted this to an Excel table, you can also do the same thing. So I'm going to select the entire range here because I want to sort everything and I'm going to go up here to sort and filter. I'm going to do custom sort. Now you gotta make sure that this check box is selected if your data has headers. Like mine here, I have labels in the top. Those are also known as headers. So if you have headers, you gotta make sure that that's selected. Otherwise it's going to try to sort those along with the rest of the data, which will put those labels way down in the sorted data. Excel does a pretty good job of detecting if your data has labels or not. So what we're going to do is we're going to sort first by years of experience in descending order, and then we're going to secondarily sort by entrance exam score. So let's go ahead and sort by years of experience. We're going to do that on cell values, but largest to smallest, so I could go ahead and do that. And so that just sorted by column C. You see that all the rows have been kept together. We wanted to now sort because you see that there's ties here. So you see we have 7 years of experience, 6 and 3. So now what we're going to do is we want to add a level of sorting. So we're going to sort by years of experience, then we're going to sort by entrance exam score. And we're also going to do largest to smallest. In each of these blocks here where we have ties for the years of experience, we're now going to sort by the last column, the entrance exam score. And I can go ahead and press OK and then we've done that. There's one more really important thing that I forgot to explain to you. Let's just put these numbers right up next to this other column. If you wanted to sort these and keep these rows together and you just happened to select this column and you went up here to sort and filter. Maybe you want to sort smallest to largest, then it's going to actually detect, and it gives you this warning. It detects if you have data right next to it, either to the left or to the right. Because you obviously, if these are combined, so these numbers correspond to the person on the right, you definitely want to keep them in rows. And in that case you're going to expand the selection. So generally if it detects something to the left or right, it's going to recommend that you expand the selection. Otherwise, you could continue with the current selection and you would independently, all you would be doing is sorting column C. So if you expand the selection, it's going to do row wise and it's going to keep those rows together. So hopefully you learned quite a bit about sorting and custom sorting in this screen cast. Thanks for watching.