Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in
x
or
x
x
Register
x

or

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.
doc rank only visible cells 1

Rank only visible/filtered cells in Excel


arrow blue right bubble Rank only visible/filtered cells 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.
doc rank only visible cells 2

Then when you filter data, the visible values will be automatically reranked.
doc rank only visible cells 3


You maybe interested in this:

Paste to Visible Range (copy and paste data in visible or filtered cells only.)

excel addin tool for paste data to filtered cells only and ignore hidden cells


Recommended Productivity Tools for Excel

Kutools for Excel Helps You Always Finish Work Ahead of Time, and Stand Out From Crowd

  • More than 300 powerful advanced features, designed for 1500 work scenarios, increasing productivity by 70%, give you more time to take care of family and enjoy life.
  • No longer need memorizing formulas and VBA codes, give your brain a rest from now on.
  • Become an Excel expert in 3 minutes, Complicated and repeated operations can be done in seconds, 
  • Reduce thousands of keyboard & mouse operations every day, say goodbye to occupational diseases now.
  • 110,000 highly effective people and 300+ world-renowned companies' choice.
  • 60-day full features free trial. 60-day money back guarantees. 2 years of free upgrade and support.

Brings Tabbed Browsing and Editing to Microsoft Office, Far More Powerful Than The Browser's Tabs

  • Office Tab is designed for Word, Excel, PowerPoint and Other Office Applications: 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!
Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    Thomas Warren · 6 months ago
    The above Rank only visible cells tip is awesome, Thank you, but CHALLENGE... How do you add excluding zeros to the array formula. I can't seem to get the syntax right to do both Visible and Non-Zero, in one array formula.