Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get the max value of un-hidden cells

Tags:

excel

vba

I have a table that has 20 rows and the table un-hides the amount of rows specified in the cell above my table. so if I put in 5 into the cell, 5 of the 20 rows will be un-hidden. So now I would like to get the MAX of the say 5 cells that are now unhidden. How would I do this?

like image 551
Mike Barnes Avatar asked Jun 04 '13 10:06

Mike Barnes


People also ask

How do I sum only unhidden cells in Excel?

Just organize your data in table (Ctrl + T) or filter the data the way you want by clicking the Filter button. After that, select the cell immediately below the column you want to total, and click the AutoSum button on the ribbon. A SUBTOTAL formula will be inserted, summing only the visible cells in the column.

How do you find the maximum value of a filtered list?

If you need to find the highest or lowest three entries in a filtered list you can use the AGGREGATE function to find them. The AGGREGATE function was introduced in Excel 2010. It works in a similar way to SUBTOTAL It has the ability to make calculations based only on visible cells.

What is the shortcut to select visible cells in Excel?

Like a lot of useful actions in Excel, there is a keyboard shortcut for this. After highlighting the entire range, press ALT + ; and only the visible cells will be selected. Once the visible cells have been selected, you can now copy just those cells.


2 Answers

=SUBTOTAL(104,RANGE)

104 will give you the max of the unhidden cells. If you replace 104 with 4 it will operate as the normal MAX function UNLESS you are filtering the rows using the built in Excel table function.

like image 185
CodeCamper Avatar answered Oct 01 '22 06:10

CodeCamper


Perhaps

=SUBTOTAL(104,your_range)
like image 28
JosieP Avatar answered Oct 01 '22 06:10

JosieP