View Single Post
  #38   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips
 
Posts: n/a
Default Summing non hidden values in a range

Exactly, you need to force a recalc, which is the same as the UDF. So it is
no better, and requires a lot of other formulae scattered about. Your
assumption on the value is exactly what I assumed, and can easily be checked
by doing
?range("D1").Value
in the immediate window in the VBIDE, after forcing the recalc of course,
and indeed it does show 0.

--
HTH

Bob Phillips

(remove xxx from email address if mailing direct)

"Dominic" wrote in message
...
Bob,

I got this to work for me by changing the formula in D1 to:

=CELL("width",D2)

For Excel2k (at least) you need to force a recalc to get the totals in
column L to refresh.

I imagine that when you hide column X the value in X1 turns to zero,

though
its hard to see to confirm. ;-)



"Bob Phillips" wrote:

Can you explain that, it doesn't work for me?

--
HTH

Bob Phillips

(remove xxx from email address if mailing direct)

"CaptainQuattro"
<CaptainQuattro.277voy_1146635100.8876@excelforu m-nospam.com wrote in
message

news:CaptainQuattro.277voy_1146635100.8876@excelfo rum-nospam.com...

Here's a workaround that will work in any version of Excel:


In row 1 Column D enter =CELL("width",A2)

Copy to cells E1 through K1

in Cell L11 enter

=SUMIF(D1:K1,"0",D11:K11)


--
CaptainQuattro


------------------------------------------------------------------------
CaptainQuattro's Profile:

http://www.excelforum.com/member.php...o&userid=32763
View this thread:

http://www.excelforum.com/showthread...hreadid=537953