+ Reply to Thread
Results 1 to 4 of 4

Count Nonblank cells and exclude Sub Totals

  1. #1
    Registered User
    Join Date
    12-07-2010
    Location
    Aberdeen
    MS-Off Ver
    Excel 2013
    Posts
    50

    Count Nonblank cells and exclude Sub Totals

    Can anyone tell me if it's possible to count a column of cells but exclude cells that contain a sub total. ie ignore anything that begins "=Sum("

    Thanks.

    Seve

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,728

    Re: Count Nonblank cells and exclude Sub Totals

    First of all, do a Find & Replace (CTRL-H) on that column, and change SUM( to SUBTOTAL(109, (exactly as typed, including the final comma). Then you can use =SUBTOTAL(109,range) instead of =SUM(range) to get your correct subtotals.

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    12-07-2010
    Location
    Aberdeen
    MS-Off Ver
    Excel 2013
    Posts
    50

    Re: Count Nonblank cells and exclude Sub Totals

    Thanks for the reply Pete,
    However, I am trying to count the cells in the column that are nonblank but exclude Subtotals from the count.

    Hope this makes sense.

    Seve.

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,728

    Re: Count Nonblank cells and exclude Sub Totals

    If you mean count rather than sum, then use 102 instead of 109. For further details of what those numbers mean, check out Excel Help for the SUBTOTAL function. Blank cells will not be counted if you use COUNT (102), but COUNTA (103) will include formula blanks.

    Hope this helps.

    Pete

+ 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