+ Reply to Thread
Results 1 to 6 of 6

Ignoring autofiler hidden rows with SUMPRODUCT and SUBTOTAL

  1. #1
    Registered User
    Join Date
    02-05-2009
    Location
    Belfast, Northern Ireland
    MS-Off Ver
    Excel 2003
    Posts
    59

    Ignoring autofiler hidden rows with SUMPRODUCT and SUBTOTAL

    Hi, I posted a thread a while back about how to ignore hidden rows from autofilter when using formulas...

    http://www.excelforum.com/excel-work...ml#post2039071

    The solution worked perfectly.... But I have since had to use this on another sheet which is laid out a bit differently, I have tried everything to try and modify the formula to work on the new sheet but so far I have failed miserably!! I need to do the exact same thing on this sheet - filter the sheet by week and search the data for certain criteria ('Line' and 'Fail Reason') and sum up the total quantity, while ignoring autofilters hidden rows.

    Here is an example of the sheet, along with an attempt of mine to modify the formula, which I think I have got TOTALLY wrong!
    Attached Files Attached Files
    Last edited by JONNY981; 02-20-2009 at 05:58 AM.

  2. #2
    Forum Expert
    Join Date
    06-18-2004
    Location
    Canada
    MS-Off Ver
    Office 2016
    Posts
    1,474

    Re: Ignoring autofiler hidden rows with SUMPRODUCT and SUBTOTAL

    Try...

    B3, copied down and to Columns E, H, etc.:

    =SUMPRODUCT(SUBTOTAL(3,OFFSET('Raw Data'!$D$2:$D$4000,ROW('Raw Data'!$D$2:$D$4000)-ROW('Raw Data'!$D$2),0,1)),--('Raw Data'!$D$2:$D$4000=Costs!B$1),--('Raw Data'!$E$2:$E$4000=Costs!$A3))

    Hope this helps!

  3. #3
    Registered User
    Join Date
    02-05-2009
    Location
    Belfast, Northern Ireland
    MS-Off Ver
    Excel 2003
    Posts
    59

    Re: Ignoring autofiler hidden rows with SUMPRODUCT and SUBTOTAL

    Thanks!! the formula works fine, but doesn't quite do what I need it to, rather than counting the instances of each fail reason I actually need it to sum up what is in the 'QTY' column for each fail reason...

    For example.......

    in the 'Costs' sheet cell B9 displays a result of '2' since there are two instances of 'PCB NOT POPULATED', whereas I need it do display '248', which is the sum of numbers in the 'QTY' column for Line 0 'PCB NOT POPULATED'

    Sorry, I probably wasnt clear enough on that!

  4. #4
    Forum Expert
    Join Date
    06-18-2004
    Location
    Canada
    MS-Off Ver
    Office 2016
    Posts
    1,474

    Re: Ignoring autofiler hidden rows with SUMPRODUCT and SUBTOTAL

    Try the following instead...

    =SUMPRODUCT(SUBTOTAL(9,OFFSET('Raw Data'!$H$2:$H$4000,ROW('Raw Data'!$H$2:$H$4000)-ROW('Raw Data'!$H$2),0,1)),--('Raw Data'!$D$2:$D$4000=Costs!B$1),--('Raw Data'!$E$2:$E$4000=Costs!$A3))

    Hope this helps!

  5. #5
    Registered User
    Join Date
    02-05-2009
    Location
    Belfast, Northern Ireland
    MS-Off Ver
    Excel 2003
    Posts
    59

    Re: Ignoring autofiler hidden rows with SUMPRODUCT and SUBTOTAL

    Works perfectly, thanks again!!

  6. #6
    Forum Expert
    Join Date
    06-18-2004
    Location
    Canada
    MS-Off Ver
    Office 2016
    Posts
    1,474

    Re: Ignoring autofiler hidden rows with SUMPRODUCT and SUBTOTAL

    You're very welcome!

+ 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