+ Reply to Thread
Results 1 to 10 of 10

how do i create a SUMIF to ignore cells hidden with autofilter

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

    how do i create a SUMIF to ignore cells hidden with autofilter

    I have a formula to search a sheet for certain criteria and sum up the total, data is entered into this sheet by week number, where I then filter it for whichever week I need. I following formula works fine, but adds all the cells including hidden ones, how can i get it to ignore hidden cells??

    =SUM(IF('FT Line 1-RX'!$C$2:$C$2100='FT costs 1-Rx'!B$1,IF('FT Line 1-RX'!$E$1:$GT$1='FT costs 1-Rx'!$A11,'FT Line 1-RX'!$E$2:$GT$2100)))

    There is raw data in the 'FT Line 1-RX' sheet which is summed up in the 'FT costs 1-RX' sheet.
    Last edited by NBVC; 02-06-2009 at 10:21 AM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: how do i create a SUMIF to ignore cells hidden with autofilter

    Does this work? ... not tested...

    If it doesn't can you post your workbook - minus confidential stuff...

    Please Login or Register  to view this content.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

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

    Re: how do i create a SUMIF to ignore cells hidden with autofilter

    Unfortunately that didnt work, well it worked but it didn't ignore any of the hidden cells, I have enclosed a sample if it may be of use, although now that I have re entered my formulas I am getting '#VALUE!' Error!!

    Thanks

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

    Re: how do i create a SUMIF to ignore cells hidden with autofilter

    hmm maybe if i remembered to attach the file!!
    Attached Files Attached Files

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

    Re: how do i create a SUMIF to ignore cells hidden with autofilter

    Quote Originally Posted by JONNY981 View Post
    hmm maybe if i remembered to attach the file!!
    Try...

    =SUMPRODUCT(SUBTOTAL(3,OFFSET(Sheet1!$C$2:$C$14,ROW(Sheet1!$C$2:$C$14)-ROW(Sheet1!$C$2),0,1)),--(Sheet1!$C$2:$C$14=Sheet2!B$1),INDEX(Sheet1!$E$2:$H$14,0,MATCH(Sheet2!$A2,Sheet1!$E$1:$H$1,0)))

    Hope this helps!

  6. #6
    Valued Forum Contributor Shijesh Kumar's Avatar
    Join Date
    05-26-2008
    Location
    Bangalore / India
    MS-Off Ver
    2000
    Posts
    717

    Re: how do i create a SUMIF to ignore cells hidden with autofilter

    Hi,

    While doing autofilter you would have applied some condition..

    Why dont u add tht condition to sumproduct to get the sum for only visible row.

    Example... Suppose you autofiler Column A for values "Apple", this mean other values not all hidden

    =Sumproudct ( your condtion 1 , your condition 2 , A:A ="Apple")

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

    Re: how do i create a SUMIF to ignore cells hidden with autofilter

    Try...

    =SUMPRODUCT(SUBTOTAL(3,OFFSET(Sheet1!$C$2:$C$14,ROW(Sheet1!$C$2:$C$14)-ROW(Sheet1!$C$2),0,1)),--(Sheet1!$C$2:$C$14=Sheet2!B$1),INDEX(Sheet1!$E$2:$H$14,0,MATCH(Sheet2!$A2,Sheet1!$E$1:$H$1,0)))

    Hope this helps!
    This worked perfectly,thanks! .....But, as that was a small sample sheet, i now have to incorporate this into a much larger sheet. The columns (i.e the fail reasons) on this sheet go to up to GV, and the rows (i.e the weeks) will probly end up going up to around 4000 (new data is entered on a daily basis), I'm just trying to change the formula in order for it to work on the main sheet, what exactly do i need to change?

    Sorry, havent used SUMPRODUCT or SUBTOTAL before(i'm a bit useless after basic formula!)

    Thanks

  8. #8
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: how do i create a SUMIF to ignore cells hidden with autofilter

    Quote Originally Posted by Domenic View Post
    Try...

    =SUMPRODUCT(SUBTOTAL(3,OFFSET(Sheet1!$C$2:$C$14,ROW(Sheet1!$C$2:$C$14)-ROW(Sheet1!$C$2),0,1)),--(Sheet1!$C$2:$C$14=Sheet2!B$1),INDEX(Sheet1!$E$2:$H$14,0,MATCH(Sheet2!$A2,Sheet1!$E$1:$H$1,0)))

    Hope this helps!
    Very nice, Domenic

  9. #9
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: how do i create a SUMIF to ignore cells hidden with autofilter

    Quote Originally Posted by JONNY981 View Post
    This worked perfectly,thanks! .....But, as that was a small sample sheet, i now have to incorporate this into a much larger sheet. The columns (i.e the fail reasons) on this sheet go to up to GV, and the rows (i.e the weeks) will probly end up going up to around 4000 (new data is entered on a daily basis), I'm just trying to change the formula in order for it to work on the main sheet, what exactly do i need to change?

    Sorry, havent used SUMPRODUCT or SUBTOTAL before(i'm a bit useless after basic formula!)

    Thanks
    Assuming your column titles in A:H don't change and you just have more titles...

    then change all the 14's in the formula to 4000 and all the H's to GV.

    You will probably need to change the sheetname, Sheet1! to 'FT Line 1-RX'! also, per your original...

    and you probably can delete all the references to Sheet2! since the formula is on the active sheet...

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

    Re: how do i create a SUMIF to ignore cells hidden with autofilter

    Thanks a lot everyone, it works and is extremely helpful!!

+ 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