create a VBA custom function for ranking the data

Occasional Visitor



I want to ask how to create a code for ranking the data for sales? 


I need to dim data as range first to get the data range first?

and use for loop to achieve the ranking system? 


1 Reply


If I may recommend, attach a file (without sensitive data) and describe your plans step by step based on this file. This way you can come up with a solution much faster.


(Drag and drop here or browse files to attach
Maximum size: 71 MB • Maximum attachments allowed: 5)

Knowledge of the Excel version, operating system and storage medium (hard drive, Sharepoint, OneDrive, etc.) would be an advantage.


Here is some general information about it:

RANK function

This upper link describes the formula syntax and usage of the RANK function in Microsoft Excel.


Create and share a Dashboard with Excel and Microsoft Groups

A dashboard is a visual representation of key metrics that allow you to quickly view and analyze your data in one place. Dashboards not only provide consolidated data views, but a self-service business intelligence opportunity, where users are able to filter the data to display just what’s important to them. In the past, Excel reporting often required you to generate multiple reports for different people or departments depending on their needs.


Hope I could help you with these links.



I know I don't know anything (Socrates)