Microsoft has guessed your need:
How to Use a VBA Macro to Sum Only Visible Cells
found at
http://support.microsoft.com/kb/150363
best wishes
--
Bernard Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
"Brian" wrote in message
...
if column a has the number 1, column b has the number 1 and column c has
the
number 1, column d has the function sum(A1:C1) for a total of 3. how can
a
change the formula so that I get an answer of 2 when column b is hidden.