Skip to main content

How to sort rows by odd or even numbers in Excel?

It is easy for us to sort the numbers by ascending or descending order in Excel, but if I have a long list of numbers, and now I want to sort them by odds or evens. That is to say, all odd or even numbers are sorted together as following screenshots shown. Is it possible for us to sort by even or odd numbers in Excel?

doc-sort-by-odd1 -2 doc-sort-by-odd2

Sort rows by odd or even numbers with a helper column

Sort rows by odd or even numbers with Kutools for Excel


To sort the list of numbers by odds or evens, you need to create a helper column to identify the odd or even numbers, and then apply the Sort function.

1. Next to the numbers, please enter this formula =ISODD(A2) in a blank cell, see screenshot:

doc-sort-by-odd3

2. Then drag the fill handle over to the cells that you want to contain this formula, the TRUE indicates odd numbers and FALSE indicates even numbers, see screenshot:

doc-sort-by-odd3

3. Then you can sort the column B that you are created by clicking Data > Sort Smallest to Largest or Sort Largest to Smallest as you want.

doc-sort-by-odd3

4. And in the Sort Warning dialog, check Expand the selection option, see screenshot:

doc-sort-by-odd3

5. Then click Sort button and the even numbers has been sorted together and then followed by the odd numbers if you select Sort Smallest to Largest icon. See screenshot:

doc-sort-by-odd3

Notes:

1. If you want to sort all odd numbers before the even numbers, you just need to select Sort Largest to Smallest in Step 3.

2. After finishing the sorting, you can delete the helper column as you need.


Here, I can talk about an easy tool – Kutools for Excel, with its Advanced Sort feature, you can quickly sort all odd numbers together and followed even numbers or vice versa.

Kutools for Excel : with more than 300 handy Excel add-ins, free to try with no limitation in 30 days.

After installing Kutools for Excel, please do as follows:

1. Select the data range that you want to sort.

2. Then click Kutools Plus > SortAdvanced Sort, see screenshot:

3. In the Advanced Sort dialog box, click the column name that you want to sort by under Column section, and then choose Odd and even number from the Sort On section, at last specify the sort order (A to Z stands for from even to odd numbers, and Z to A stands for from odd to even numbers), see screenshot:

doc-sort-by-odd3

4. And then click OK, and you will get the following results:

Original data   Sort from even to odd numbers   Sort from odd to even numbers
doc-sort-by-odd3  2 doc-sort-by-odd3  2 doc-sort-by-odd3

Click to know more about this Advanced Sort feature.

 Download and free trial Kutools for Excel Now !


Kutools for Excel: with more than 300 handy Excel add-ins, free to try with no limitation in 30 days. Download and free trial Now!

Related articles:

How to sort email address by domain in Excel?

How to sort data by the most frequent value in Excel?

How to sort or filter data by strikethrough in Excel?

How to sort rows to put the blank cells on top in Excel?

Best Office Productivity Tools

🤖 Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions
Popular Features: Find, Highlight or Identify Duplicates   |  Delete Blank Rows   |  Combine Columns or Cells without Losing Data   |   Round without Formula ...
Super Lookup: Multiple Criteria VLookup    Multiple Value VLookup  |   VLookup Across Multiple Sheets   |   Fuzzy Lookup ....
Advanced Drop-down List: Quickly Create Drop Down List   |  Dependent Drop Down List   |  Multi-select Drop Down List ....
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Ranges & Columns ...
Featured Features: Grid Focus   |  Design View   |   Big Formula Bar    Workbook & Sheet Manager   |  Resource Library (Auto Text)   |  Date Picker   |  Combine Worksheets   |  Encrypt/Decrypt Cells    Send Emails by List   |  Super Filter   |   Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters, ...)   |   50+ Chart Types (Gantt Chart, ...)   |   40+ Practical Formulas (Calculate age based on birthday, ...)   |   19 Insertion Tools (Insert QR Code, Insert Picture from Path, ...)   |   12 Conversion Tools (Numbers to Words, Currency Conversion, ...)   |   7 Merge & Split Tools (Advanced Combine Rows, Split Cells, ...)   |   ... and more

Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time.  Click Here to Get The Feature You Need The Most...

Description


Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!
Comments (0)
No ratings yet. Be the first to rate!
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations