For a better experience, please enable JavaScript in your browser before proceeding.
![]() Sort Multiple Columns In Excel Code By PressingWhere the cursor is flashing, paste the code by pressing the keys CTRL V 7. Press the keys ALT Q to exit the Editor, and return to Excel 8. To run the macro from Excel, open the workbook, and press ALT F8 to display the Run Macro Dialog. In cell A2 if the value A then allow both positive and negative integers. I have attached sample data, i need someone to help me convert the left side to how the data looks on the right. Mott has extensive experience writing advertising copy for everything from kitchen appliances and financial services to education and tourism. You can sort all the rows in a worksheet by sorting the values in one column, simplifying the task of alphabetizing a list of employees by last name or reordering a list of customer transactions by invoice value. To deepen the value of a sorting process, use Excel to sort by more than one criterion at a time. Click on the Select All button at the intersection of your row and column headings. The cells in your worksheet highlight to confirm theyre selected. Switch to the Data tab in the Microsoft Excel ribbon and locate the Sort Filter group. Click on the Sort option. Click on the Sort By drop-down menu to select a column by name. The names correspond to the headings typed in the first row of your data. The column you choose first should represent your primary sorting criteria. For example, if you want to sort an employee list by column headings Hire Date, Last Name and First Name, in that order, then the first column you select should be Hire Date. Click the Sort On drop-down menu and choose a sort criterion for this column. In the example above, select Values to sort by the dates in the cells. Click on the Order drop-down menu to select a sorting method. To sort the hire dates from earliest to most recent, choose Oldest to Newest. Click on the Add Level button at the top of the Sort dialog box to add a second sorting criterion. Set the Sort By drop-down menu to Last Name. Click the Sort On drop-down menu to select a sort criterion for this column. Continuing the above example, select Values to sort by the last names in the cells. To sort the last names alphabetically in ascending order, choose A to Z. Click on the Add Level button at the top of the Sort dialog box to add a third sorting criterion. Set the Sort By drop-down menu to First Name. Continuing the example above, select Values to sort by the first names in the cells. To sort the first names alphabetically in ascending order, choose A to Z. Click on the OK button at the bottom right of the dialog box to sort your data. The columns rearrange but the cells in individual rows remain intact, preserving the employees identities. Warnings Unlike Excels data-filtering processes, its sorting function permanently rearranges your data unless you undo the results. Tips The Order list displays context-sensitive criteria depending on the type of information you are sorting, which is defined by the formatting type applied to the cells. Excel usually recognizes whether or not your worksheet has column headers. If your data starts in row A, uncheck the My Data Has Headers option. If your worksheet doesnt use headers, the list in the Sort By menu uses column references to identify your choices. Use the arrows in the Sort dialog box to reorganize your sort criteria in a different order from the one in which you added them. Turn off any filters that hide some of your rows or columns and then perform your sort. References Microsoft Corporation: Sort Data in a Range or Table Microsoft Corporation: Quick Start: Sort Data in a Worksheet Resources Microsoft Corporation: Video Sort Data Photo Credits MedioimagesPhotodiscPhotodiscGetty Images About the Author Elizabeth Mott has been a writer since 1983.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2020
Categories |