+ Reply to Thread
Results 1 to 6 of 6

Subtotal formula to ignore N/As

  1. #1
    Registered User
    Join Date
    07-09-2009
    Location
    Los Angeles, California
    MS-Off Ver
    Excel 2007
    Posts
    21

    Subtotal formula to ignore N/As

    So I have a filtered array that I want to calculate the sum of whenever I filter it. The problem is there are some N/As in the array. Is there any way around this problem?

    I tried this:
    =SUBTOTAL(3,IF(ISNUMBER(F7:F1123),F7:F1123,FALSE))

    with ctrl+shift+enter

    and it didnt't work. Any advice?

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Subtotal formula to ignore N/As

    Look at the function_num constants for SUBTOTAL in Help.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Forum Contributor day92's Avatar
    Join Date
    04-20-2010
    Location
    Los Angeles
    MS-Off Ver
    Excel 360
    Posts
    600

    Re: Subtotal formula to ignore N/As

    Try this...

    =IF(ISERROR(SUBTOTAL(3,IF(ISNUMBER(F7:F1123),F7:F1123,FALSE))),"",SUBTOTAL(3,IF(ISNUMBER(F7:F1123),F7:F1123,FALSE)))

  4. #4
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,739

    Re: Subtotal formula to ignore N/As

    You can't feed an array to SUBTOTAL in that way, try like this

    =SUM(IF(ISNUMBER(F7:F1123),IF(SUBTOTAL(2,F7:F1123),F7:F1123)))

    confirmed with CTRL+SHIFT+ENTER

  5. #5
    Registered User
    Join Date
    07-09-2009
    Location
    Los Angeles, California
    MS-Off Ver
    Excel 2007
    Posts
    21

    Re: Subtotal formula to ignore N/As

    ya but will that work with filters?

  6. #6
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,739

    Re: Subtotal formula to ignore N/As

    Actually, in hindsight, no, that won't work, sorry, you can't use SUBTOTAL like that either, you need an OFFSET function in there like this

    =SUM(IF(SUBTOTAL(2,OFFSET(F7,ROW(F7:F1123)-ROW(F7),0)),F7:F1123))

    confirmed with CTRL+SHIFT+ENTER

    That will sum all of the visble numbers (after filtering) but ignore any errors, is that what you need?

+ 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