Sort Lottery Number) Rows in Excel

A Formula can Sort Multiple Rows Of Data

Debbie posted a comment to the Sort a Row In Excel 2010 blog post. She asked about sorting 2000 rows left-to-right. Although she didn't claim they were lottery numbers as such, her example (shown below) sure looks like it to me.

A formula in columns to the left is one way to sort rows.

Below is a screen shot. Cells H1:M1 have been selected. Next, enter the SMALL formula. Finally, copy the formula down until the last row of numbers to view all rows in ascending order.

You can also copy and paste the formula columns as values.

Use a Macro to Sort Multiple Rows

You don't have to use formulas to sort rows. A macro can be used to do this. This macro by Dave Peterson will sort all rows on the active worksheet, starting with row 1. It assumes that there are six columns of numbers.

Before you start sorting with the macro, make a duplicate of your original worksheet.