Skip to main content

Posts

Showing posts with the label Conditional Sorting and Filtering

Custom sort

Excel allows you to customize the sort order of your data by creating a custom sort order. This can be useful when you have data that does not sort correctly using the built-in sort options, or when you want to sort data in a specific order that is not alphabetical or numerical. To create a custom sort order in Excel: Select the data that you want to sort. Go to the Data tab, in the Sort & Filter group, click on the Sort A-Z button. In the Sort dialog box, select the column that you want to sort by. Click the Options button. Select the "Sort On" option and choose "Custom List" In the Custom List section, select the list you want to use or type in your own list. Click OK to apply the custom sort order. Alternatively, you can also use the VBA code to sort the data by a custom list. Here is an example of VBA code that sorts a range called "MyRange" using a custom list: Copy code With MyRange .Sort Key1:=.Cells(1), Order1:=xlAscending, _ K...

Horizontal sorting

In Excel, you can sort data horizontally by using the "Sort Left to Right" option. To do this, select the range of cells that you want to sort, then go to the "Data" tab and click on the "Sort" button. In the "Sort" dialog box, select "Options" and then choose "Sort Left to Right". You can then specify the column that you want to sort by and whether you want the sort to be in ascending or descending order.