+ Reply to Thread
Results 1 to 4 of 4

Ranking Positive and Negative Numbers in a Column

  1. #1
    Registered User
    Join Date
    03-28-2018
    Location
    USA
    MS-Off Ver
    Microsoft Excel 2011
    Posts
    14

    Ranking Positive and Negative Numbers in a Column

    Hello Excel Guru's,

    I have the following formula for Ranking Positive and Negative Numbers in a Column. However, both formulas Rank the numbers in Ascending Order with the Lowest Value in the Column being given the #1 Rank.
    I need to Rank both the Positive and Negative Numbers in Descending Order with the Highest Value in the Column being given the Highest Rank.

    =IF($E5>0,MATCH($E5,SMALL(IF(Net>0,Net),ROW(INDIRECT("1:"&COUNTIF(Net,">0")))),1),"")

    =IF($E5<0,MATCH($E5,LARGE(IF(Net<0,Net),ROW(INDIRECT("1:"&COUNTIF(Net,"<0")))),0),"")

    Any help in solving this will be appreciated.

    Thanks in advance.

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,610

    Re: Ranking Positive and Negative Numbers in a Column

    (How to) Upload a Workbook directly to the Forum
    (please do not post pictures or links to worksheets)
    • Click Advanced next to Quick Post button at the bottom right of the editor box.
    • Scroll down until you see "Manage Attachments",
    • Click the "Choose" button at the upper left (upload from your computer).
    • Select your file, click "open", click "upload"
    • Once the upload is completed the file name will appear below the input boxes in this window.
    • Close the Attachment Manager window.
    • Click "Submit Reply"
    Note: Please do not attach password protected workbooks/worksheets
    Ensure to disable any Workbook Open/Autorun macros before attaching!
    Ben Van Johnson

  3. #3
    Registered User
    Join Date
    03-28-2018
    Location
    USA
    MS-Off Ver
    Microsoft Excel 2011
    Posts
    14

    Re: Ranking Positive and Negative Numbers in a Column

    Sample provided. thanks.
    Attached Files Attached Files

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,552

    Re: Ranking Positive and Negative Numbers in a Column

    Assuming that you want to use the formulas to populate the Risk and Risk2 columns, try the following:
    For Risk: =IF(OR(E5="",E5<=0),"",SUMPRODUCT((E$5:E$8>0)*(E$5:E$8<>"")*(E$5:E$8>E5))+1)
    For Risk2: =IF(OR(E5="",E5>=0),"",SUMPRODUCT((E$5:E$8<0)*(E$5:E$8<>"")*(E$5:E$8>E5))+1)
    A more robust demonstration of the formulas is in rows 14:20
    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Find consecutive 15 positive or negative numbers in a column
    By Sarangsood in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 11-19-2013, 05:26 AM
  2. Convert negative to positive in sheet containing both positive/negative numbers
    By sa02000 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-29-2010, 07:52 PM
  3. Replies: 3
    Last Post: 12-17-2009, 09:14 AM
  4. [SOLVED] Convert a column of numbers from positive to negative in Excel
    By JRoseen in forum Excel General
    Replies: 4
    Last Post: 07-07-2006, 02:25 PM
  5. Replies: 2
    Last Post: 09-28-2005, 12:05 PM
  6. How to turn positive numbers in a column to negative numbers ?
    By Dbase Beginner in forum Excel General
    Replies: 1
    Last Post: 03-30-2005, 03:14 AM
  7. Replies: 3
    Last Post: 03-24-2005, 03:06 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1