sum only visible cells

G

Guest

Hi, all!
Is there a way to sum just the visible cells in a range?
Excel lets one copy or select only visible cells. Can I use an IIF to test a
cell is hiden or not then decide if it should be included in the calculation?

Thanks!
 
G

Guest

If by chance, the cells are hidden by a filter, the SUBTOTAL function may
work for you. In a filtered list, the SUBTOTAL function only includes
visible cells.
Check Excel help for details.

Is that something you can work with?
***********
Regards,
Ron

XL2002, WinXP
 
P

Peo Sjoblom

Are they hidden or filtered? If filtered you can use

=SUBTOTAL(9,Full_range)

will sum only visible cells that have been filtered, if they are hidden you
can use

=SUBTOTAL(109,Full_range)

the last function was introduced in Excel 2003 so for previous versions you
can't use it so for 97-2002 you need to write a UDF

--

Regards,

Peo Sjoblom

http://nwexcelsolutions.com
 
0

0-0 Wai Wai ^-^

What's UDF?
How to write a UDF?

Peo Sjoblom said:
Are they hidden or filtered? If filtered you can use

=SUBTOTAL(9,Full_range)

will sum only visible cells that have been filtered, if they are hidden you
can use

=SUBTOTAL(109,Full_range)

the last function was introduced in Excel 2003 so for previous versions you
can't use it so for 97-2002 you need to write a UDF

--

Regards,

Peo Sjoblom

http://nwexcelsolutions.com
 
G

Guest

UDF = User Defined Function

Peo Sjoblom's post above links to a page showing how to write one and how to
access it in a cell.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top