+ Reply to Thread
Results 1 to 6 of 6

Formula is summing hidden cells

  1. #1
    Registered User
    Join Date
    10-11-2013
    Location
    Victoria, Australia
    MS-Off Ver
    Excel 2010
    Posts
    48

    Formula is summing hidden cells

    I have this long winded formula that is copied down each cell in its column

    =IF([@[Month Num]]<>Y4,SUMIF(Y:Y,[@[Month Num]],P:P),"")

    I often have some rows hidden, I'm looking for the correct way to adjust this formula so that it does not calculate hidden rows.
    any help appreciated

  2. #2
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,829

    Re: Formula is summing hidden cells

    Try the AGGREGATE() function -- which has an option to ignore hidden cells: https://support.office.com/en-us/art...6-e19993fa26df
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  3. #3
    Registered User
    Join Date
    10-11-2013
    Location
    Victoria, Australia
    MS-Off Ver
    Excel 2010
    Posts
    48

    Re: Formula is summing hidden cells

    How/where would i place it in the above mention formula. I understand the basics of this function in a simple formula on its own, but dont have a clue as to how to add it to my complex formula

  4. #4
    Registered User
    Join Date
    04-26-2020
    Location
    Seattle,USA
    MS-Off Ver
    2016
    Posts
    1

    Re: Formula is summing hidden cells

    You do not need the complex formula. As MrShorty pointed out, you can use the Aggregate formula. Alternatively, you can use the SubTotal Formula.
    Suppose, you have your data in between B2 and B5, you can place the SUBTOTAL or the AGGREGATE formula in a cell where you want the total to be displayed.

    =SUBTOTAL(9,B2:B5)
    =AGGREGATE(9,1,B2:B5)

    Please see the attached screenshot for sample implementation

    Attachment 676933
    Last edited by ExcelTips_2020; 05-10-2020 at 12:39 AM.

  5. #5
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,829

    Re: Formula is summing hidden cells

    I would expect to use the AGGREGATE() function in place of your SUMIF() function.

    Another idea -- would this work better as a pivot table where you can sum and filter in one operation?

  6. #6
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Formula is summing hidden cells

    @jojo101

    off topic.

    You still did not answer to your question below.

    https://www.excelforum.com/excel-for...-required.html

    There is no rule that states that threads have to be marked as solved, although we much prefer it if they are.

    If you are satisfied with the solution, please mark that question solved.
    Last edited by oeldere; 05-10-2020 at 03:42 AM. Reason: changed marking thtread solved
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Formula for summing cells
    By darijokesar in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-12-2017, 06:10 PM
  2. Replies: 11
    Last Post: 06-13-2013, 05:00 AM
  3. Summing cells where one has a formula
    By jacko311 in forum Excel General
    Replies: 4
    Last Post: 12-27-2009, 09:12 PM
  4. Formula about summing cells
    By LEIGHHAYES in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-11-2008, 12:10 AM
  5. copying hidden cells and paste to non hidden cells on same sheet
    By 2newguy in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-11-2007, 02:39 PM
  6. Summing non hidden values in a range
    By starguy in forum Excel General
    Replies: 39
    Last Post: 05-04-2006, 04:40 PM
  7. Summing only those cells that aren't hidden
    By JodyK in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-13-2005, 02:05 PM

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