The right sort

BY J. CARLTON COLLINS

Q: I receive large amounts of data that need to be sorted both vertically and horizontally in Excel. I typically accomplish this task by transposing the data onto a separate worksheet (using the Paste Special, Transpose command), where I sort the data vertically (which is actually a horizontal sort because the data has been transposed). I then transpose the sorted data back to the original worksheet and sort the data vertically to complete the double sort task. The data we receive is never the same size and, often, extra columns are included—ruling out an easy macro solution. Is there a way to make this task easier?

A: Excel 2010, 2007 and 2003 all provide the ability to sort top to bottom and left to right, with Sort top to bottom as the default setting. To use the Sort left to right option, select the data to be sorted, then select Sort from the Data tab (or menu). In the Sort dialog box, click the Options button, click the Sort left to right radio button, and then click OK.

Define the sort criteria as you normally would, then click OK to complete the left-to-right sort. Once you have completed this task, sort the data again, this time changing the option back to Sort top to bottom. Using this approach, you will avoid the extra tasks of copying, pasting and transposing data twice between two worksheets.

More from the JofA:

 Find us on Facebook  |   Follow us on Twitter  |   View JofA videos

SPONSORED REPORT

How the election may affect taxation of business income

This report summarizes recent proposals to reform the U.S. business income tax system and considers the path to enactment of any such legislation.

VIDEO

How to Excel pivot a general ledger

The general ledger is a vast historical data archive of your company's financial activities, including revenue, expenses, adjustments, and account balances. J. Carlton Collins, CPA, shows how to prepare data for, and mine data with, PivotTables.

QUIZ

Did you follow 2016’s biggest accounting news?

CPAs will remember 2016 as a year of new standards and new faces. How well did you follow the biggest accounting events? The 7 questions in this quiz will help you find out