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

Revenue recognition: A complex effort

Implementing the new standard requires careful judgment. Learn how to make significant accounting judgments and document them and collaborate with peers for consistent application.

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

News quiz: Taking an economic snapshot and looking to the future

Recent news included IRS actions that affect individuals and partnerships and a possibly influential move by a Big Four accounting firm.Take this short quiz to see how much you know about the news.