im trying to use the subtotal formula so that it will not count any hidden cells. Loking online the formula should
=sbutotal(109,range)
however when i try this it errors out and shows #value in the cell.
Any suggestions would be great
im trying to use the subtotal formula so that it will not count any hidden cells. Loking online the formula should
=sbutotal(109,range)
however when i try this it errors out and shows #value in the cell.
Any suggestions would be great
try to correct:
=SUBTOTAL(109,RANGE)
yh sorry thats what i meant bad typing on my behalf
that is correct the way you are doing it
http://office.microsoft.com/en-us/ex...005209288.aspx but if you have excel <2003 it gives #value
so for excel 97 and 2000 it is subtotal(9,range)
"Unless otherwise stated all my comments are directed at OP"
Mojito connoisseur and now happily retired
where does code go ?
look here
how to insert code
how to enter array formula
why use -- in sumproduct
recommended reading
wiki Mojito
how to say no convincingly
most important thing you need
Martin Wilson: SPV
and RSMBC
ive got the subtotal to to work using subtotal(9,range) however this still includes the value of hidden cells. subtotal(109,range) should only total the values that are visible, i however cant get this to work
Can you post a sample? It should work in 2003 and upwards.
Good luck.
This is a quick example
just checked and im using mocrosoft excel 2002 on SP3 is there any suggestions for a formula i can use to get the same results
Are you definitely using Excel 2003? (I can see that the formula did return #VALUE! for you)
no sorry its 2002, i was being optimistic
Then you would need code. Perhaps
Note: I do not believe that Excel 2002 or earlier cause a recalculation when you hide a row, so the formula is dependent on other factors causing the workbook to recalculate.Please Login or Register to view this content.
how would i add this code to a certain cell, and which line affects the range that is subtotalled
You add that code to a normal module in your workbook and then in the cell you use:
=SumVis(A1:A5)
for example.
subtotal(9,range), works fine on autofilterd cells,how are you hiding cells?
yh im hiding cells
Then either you have macros disabled or the code is not in a normal module in the same workbook.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks