+ Reply to Thread
Results 1 to 5 of 5

SUMIF Excluding hidden rows

  1. #1
    Registered User
    Join Date
    08-21-2008
    Location
    Adelaide
    Posts
    2

    SUMIF Excluding hidden rows

    Hello

    I am having some difficulty working out how to exclude hidden (filtered) rows when using a SUMIF function.

    =SUMIF(X8:X3000),2.0647,T8:T3000)

    Can someone please assist with this problem

    MT

  2. #2
    Forum Expert Colin Legg's Avatar
    Join Date
    03-30-2008
    Location
    UK
    MS-Off Ver
    365
    Posts
    1,256
    Hello,

    If your data is filtered by column X and the filter criteria is 2.0647 then you can just sum all the visible rows using the Subtotal function:

    =SUBTOTAL(9,T8:T3000)



    If you want to conditionally sum visible cells that could be filtered in any way, try this formula instead:

    =-SUMPRODUCT(SUBTOTAL(3,OFFSET(T8,ROW(T8:T3000)-ROW(T8),,1)),-(X8:X3000=2.0647),(T8:T3000))

    Colin

  3. #3
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    Quote Originally Posted by colin_l View Post
    =-SUMPRODUCT(SUBTOTAL(3,OFFSET(T8,ROW(T8:T3000)-ROW(T8),,1)),-(X8:X3000=2.0647),(T8:T3000))
    ...or you can shorten a little by using 9 rather than 3 as the first argument for SUBTOTAL, i.e.

    =SUMPRODUCT(SUBTOTAL(9,OFFSET(T8,ROW(T8:T3000)-ROW(T8),0)),--(X8:X3000=2.0647))

  4. #4
    Forum Expert Colin Legg's Avatar
    Join Date
    03-30-2008
    Location
    UK
    MS-Off Ver
    365
    Posts
    1,256
    Most definitely! Nice improvement, daddylonglegs.

    Silly of me since I even used 9 in the simpler version!

    Colin

  5. #5
    Registered User
    Join Date
    08-21-2008
    Location
    Adelaide
    Posts
    2

    SUMIF hidden rows

    Ahhh thankyou very much

    That is exactly what I am after

+ 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. Paste without taking into account the hidden rows
    By chibouki in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-03-2008, 07:32 AM
  2. Replies: 4
    Last Post: 05-19-2008, 05:13 PM
  3. Cut and Paste Hidden Rows
    By cybercab in forum Excel General
    Replies: 4
    Last Post: 10-11-2007, 11:36 AM
  4. Delete hidden rows & columns
    By tommy_gtr in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-04-2007, 06:12 AM
  5. Deleting hidden rows
    By Tobeman in forum Excel General
    Replies: 2
    Last Post: 10-27-2006, 05:11 AM

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