+ Reply to Thread
Results 1 to 4 of 4

Excel VBA - Counting Negative Values and Ranking Them

  1. #1
    Registered User
    Join Date
    05-02-2019
    Location
    USA
    MS-Off Ver
    2016
    Posts
    84

    Question Excel VBA - Counting Negative Values and Ranking Them

    Trying to count the negative values and ranking them from highest count to lowest

    Capture.PNG

    I was going to use the worksheet function like this

    Please Login or Register  to view this content.
    But not sure how I can rank them. Maybe I need to use array here?

    Result should rank Orange (3), Banana (2) and Apple (1)

  2. #2
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Excel VBA - Counting Negative Values and Ranking Them

    Why not just use a formula to rank?

    For that matter, why not also just use a formula for the Countif?

    If you can provide a sample workbook that sure would help and a better idea on how you want to achieve what and where.



    Attach a sample workbook (not a picture or pasted copy). Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    HTH
    Regards, Jeff

  3. #3
    Registered User
    Join Date
    05-02-2019
    Location
    USA
    MS-Off Ver
    2016
    Posts
    84

    Re: Excel VBA - Counting Negative Values and Ranking Them

    Right, this is easy with Formula but that's not an option, the result can be anything like msgbox or result on any cell

  4. #4
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Excel VBA - Counting Negative Values and Ranking Them

    How about...

    Please Login or Register  to view this content.

+ 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] Ranking with duplicate values while ignoring zeros and negative values
    By mfortier3 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-06-2017, 04:43 AM
  2. Replies: 3
    Last Post: 11-24-2016, 05:26 AM
  3. [SOLVED] Ranking Groups of Combined Positive and Negative Values
    By hammer2 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 11-24-2016, 04:19 AM
  4. Counting fourmula of negative values only
    By Peter Angelico in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-08-2016, 10:01 PM
  5. counting frquency of values and ranking
    By MMSigns in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-15-2015, 11:03 PM
  6. [SOLVED] Counting Negative Values in a Range
    By andrewc in forum Excel General
    Replies: 9
    Last Post: 12-14-2012, 08:31 AM
  7. Ignore all negative values when counting in another column.
    By Quagga in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-18-2011, 04:38 AM

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