Summing only #'s on unhidden columns

P

Peter Trumbo

Assume cells B1, C1 and D1 have 5's in them and that I hide column C. I am
trying to figure out how to sum B1:d1 and get the answer 10. When I try to
use the =subtotal(109,b1:d1) function it returns the answer 15.

Subtotal(109,x:y) works to add only shown rows but it doesn't seem to work
on column sums.

Does anybody have a suggestion.

Thanks

Peter
 
D

Dave Peterson

Peter said:
Assume cells B1, C1 and D1 have 5's in them and that I hide column C. I am
trying to figure out how to sum B1:d1 and get the answer 10. When I try to
use the =subtotal(109,b1:d1) function it returns the answer 15.

Subtotal(109,x:y) works to add only shown rows but it doesn't seem to work
on column sums.

Does anybody have a suggestion.

Thanks

Peter
 
D

Dave Peterson

If the hidden/visible columns don't change (or don't change very often), you may
want to consider using an indicator row (manually updated).

You could put an x in row 1 in each column that should be visible (and hide row
1).

Then use a formula like:
=sumif($1$1,"x",2:2)
or
=sumif($b$1:$d$1,"x",$b2:$d2)
 

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

Top