How to rank only visible cells in Excel?
In general, all the cells including both filtered values and unfiltered values will be ranked by the Rank function. However, in some cases, you just want to rank only the filtered values which means to rank only visible cells in the sheet as below screenshot shown in Excel.
To rank only visible cells, you can apply a formula.
Select a cell that you want to place the ranking result, type this formula =SUM(IF(SUBTOTAL(103,OFFSET($A$2:$A$8,ROW($A$2:$A$8)-ROW($A$2),0,1))>0,IF(A2<$A$2:$A$8,1)))+1, press Shift + Ctrl + Enter keys, then drag auto fill handle down to fill this formula to the cells.
In the formula, A2 are the first cell you want to rank, A2:A8 is the range you want to rank.
Then when you filter data, the visible values will be automatically reranked.
Best Office Productivity Tools
Supercharge Your Spreadsheets： Experience Efficiency Like Never Before with Kutools for Excel
Kutools for Excel boasts over 300 features, ensuring that what you need is just a click away...
Supports Office/Excel 2007-2021 & newer, including 365 | Available in 44 languages | Enjoy a full-featured 30-day free trial.
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!