+ Reply to Thread
Results 1 to 18 of 18

disregarding hidden cells

  1. #1
    Registered User
    Join Date
    01-04-2012
    Location
    Preston, England
    MS-Off Ver
    Excel 2010
    Posts
    49

    disregarding hidden cells

    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

  2. #2
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,481

    Re: disregarding hidden cells

    try to correct:
    =SUBTOTAL(109,RANGE)

  3. #3
    Registered User
    Join Date
    01-04-2012
    Location
    Preston, England
    MS-Off Ver
    Excel 2010
    Posts
    49

    Re: disregarding hidden cells

    yh sorry thats what i meant bad typing on my behalf

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: disregarding hidden cells

    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

  5. #5
    Registered User
    Join Date
    01-04-2012
    Location
    Preston, England
    MS-Off Ver
    Excel 2010
    Posts
    49

    Re: disregarding hidden cells

    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

  6. #6
    Forum Expert OnErrorGoto0's Avatar
    Join Date
    12-30-2011
    Location
    I DO NOT POST HERE ANYMORE
    MS-Off Ver
    I DO NOT POST HERE ANYMORE
    Posts
    1,655

    Re: disregarding hidden cells

    Can you post a sample? It should work in 2003 and upwards.
    Good luck.

  7. #7
    Registered User
    Join Date
    01-04-2012
    Location
    Preston, England
    MS-Off Ver
    Excel 2010
    Posts
    49

    Re: disregarding hidden cells

    This is a quick example
    Attached Files Attached Files

  8. #8
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,481

    Re: disregarding hidden cells

    Quote Originally Posted by SalamanderSam14 View Post
    This is a quick example
    I could not find any mistake here. There is no hidden cell. If any, this formula works properly.

  9. #9
    Registered User
    Join Date
    01-04-2012
    Location
    Preston, England
    MS-Off Ver
    Excel 2010
    Posts
    49

    Re: disregarding hidden cells

    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

  10. #10
    Forum Expert OnErrorGoto0's Avatar
    Join Date
    12-30-2011
    Location
    I DO NOT POST HERE ANYMORE
    MS-Off Ver
    I DO NOT POST HERE ANYMORE
    Posts
    1,655

    Re: disregarding hidden cells

    Are you definitely using Excel 2003? (I can see that the formula did return #VALUE! for you)

  11. #11
    Registered User
    Join Date
    01-04-2012
    Location
    Preston, England
    MS-Off Ver
    Excel 2010
    Posts
    49

    Re: disregarding hidden cells

    no sorry its 2002, i was being optimistic

  12. #12
    Forum Expert OnErrorGoto0's Avatar
    Join Date
    12-30-2011
    Location
    I DO NOT POST HERE ANYMORE
    MS-Off Ver
    I DO NOT POST HERE ANYMORE
    Posts
    1,655

    Re: disregarding hidden cells

    Then you would need code. Perhaps
    Please Login or Register  to view this content.
    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.

  13. #13
    Registered User
    Join Date
    01-04-2012
    Location
    Preston, England
    MS-Off Ver
    Excel 2010
    Posts
    49

    Re: disregarding hidden cells

    how would i add this code to a certain cell, and which line affects the range that is subtotalled

  14. #14
    Forum Expert OnErrorGoto0's Avatar
    Join Date
    12-30-2011
    Location
    I DO NOT POST HERE ANYMORE
    MS-Off Ver
    I DO NOT POST HERE ANYMORE
    Posts
    1,655

    Re: disregarding hidden cells

    You add that code to a normal module in your workbook and then in the cell you use:
    =SumVis(A1:A5)
    for example.

  15. #15
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: disregarding hidden cells

    subtotal(9,range), works fine on autofilterd cells,how are you hiding cells?

  16. #16
    Registered User
    Join Date
    01-04-2012
    Location
    Preston, England
    MS-Off Ver
    Excel 2010
    Posts
    49

    Re: disregarding hidden cells

    yh im hiding cells

  17. #17
    Registered User
    Join Date
    01-04-2012
    Location
    Preston, England
    MS-Off Ver
    Excel 2010
    Posts
    49

    Re: disregarding hidden cells

    Quote Originally Posted by OnErrorGoto0 View Post
    You add that code to a normal module in your workbook and then in the cell you use:
    =SumVis(A1:A5)
    for example.
    ive tried this on a sample workbook but it errors and says #NAME?

  18. #18
    Forum Expert OnErrorGoto0's Avatar
    Join Date
    12-30-2011
    Location
    I DO NOT POST HERE ANYMORE
    MS-Off Ver
    I DO NOT POST HERE ANYMORE
    Posts
    1,655

    Re: disregarding hidden cells

    Then either you have macros disabled or the code is not in a normal module in the same workbook.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1