How to rank positive and negative numbers separately in Excel?
Supposing a list contains multiple positive and negative values, generally, it will rank all values by the Rank function, but what I want is to rank the positive and negative numbers separately as below screenshot shown, have any quick tricks to handle this job in Excel?
- Reuse Anything: Add the most used or complex formulas, charts and anything else to your favorites, and quickly reuse them in the future.
- More than 20 text features: Extract Number from Text String; Extract or Remove Part of Texts; Convert Numbers and Currencies to English Words.
- Merge Tools: Multiple Workbooks and Sheets into One; Merge Multiple Cells/Rows/Columns Without Losing Data; Merge Duplicate Rows and Sum.
- Split Tools: Split Data into Multiple Sheets Based on Value; One Workbook to Multiple Excel, PDF or CSV Files; One Column to Multiple Columns.
- Paste Skipping Hidden/Filtered Rows; Count And Sum by Background Color; Send Personalized Emails to Multiple Recipients in Bulk.
- Super Filter: Create advanced filter schemes and apply to any sheets; Sort by week, day, frequency and more; Filter by bold, formulas, comment...
- More than 300 powerful features; Works with Office 2007-2019 and 365; Supports all languages; Easy deploying in your enterprise or organization.
To rank positive values only, you can apply below formula.
Select a blank cell next to the list you want to rank positive values only, type this formula =IF($A2>0,MATCH($A2,SMALL(IF($A$2:$A$16>0,$A$2:$A$16),ROW(INDIRECT("1:"&COUNTIF($A$2:$A$16,">0")))),0),"") and press Shift + Ctrl + Enter keys, then drag auto fill handle down to fill this formula to cells you need.
Rank negative values only, please do as follow:
Select a cell which will place the ranking number, type this formula =IF($A2<0,MATCH($A2,LARGE(IF($A$2:$A$16<0,$A$2:$A$16),ROW(INDIRECT("1:"&COUNTIF($A$2:$A$16,"<0")))),0),""), hold Shift + Ctrl, and press Enter key to get the correct result.
You maybe interested in this:
Change Sige of Vlaues (quickly change negative to positive values, or vice versa...)