+ Reply to Thread
Results 1 to 20 of 20

Sumif and with a filter?

  1. #1
    Registered User
    Join Date
    10-15-2008
    Location
    Coventry
    MS-Off Ver
    2003
    Posts
    70

    Sumif and with a filter?

    I am trying to do a sumif

    =SUMIF(O:O,"<>do not invoice",L:L)

    but i am using filters as well, how can i get this added in as to not show the unfiltered data as well?

    thanks
    Last edited by lky2k23; 01-11-2012 at 08:18 AM.

  2. #2
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Sumif and with a filter?

    Hi

    Which are filter conditions??
    Why don't you use ranges. EX.>>o1:o50>>>>l1:l500
    Maybe you need Subtotal function.
    Would you like to upload a small sample workbook?
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  3. #3
    Registered User
    Join Date
    10-15-2008
    Location
    Coventry
    MS-Off Ver
    2003
    Posts
    70

    Re: Sumif and with a filter?

    thanks - attached.
    Attached Files Attached Files

  4. #4
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Sumif and with a filter?

    Try using
    =SUBTOTAL(109,"range to sum")

    Then filter out "do not invoice" in addition to your other conditions.
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

  5. #5
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Sumif and with a filter?

    Maybe =SUBTOTAL(9;L:L)

  6. #6
    Registered User
    Join Date
    10-15-2008
    Location
    Coventry
    MS-Off Ver
    2003
    Posts
    70

    Re: Sumif and with a filter?

    Thanks I had hoped there would have been a way to avoid that but i dont need to see the do not invoices anyway.

  7. #7
    Forum Expert OnErrorGoto0's Avatar
    Join Date
    12-30-2011
    Location
    I DO NOT POST HERE ANYMORE
    MS-Off Ver
    I DO NOT POST HERE ANYMORE
    Posts
    1,655

    Re: Sumif and with a filter?

    I think you would need a formula like

    =SUM(IF($O$2:$O$1658<>"Do not invoice",IF(SUBTOTAL(3,OFFSET($L$2:$L$1658,ROW($L$2:$L$1658)-MIN(ROW($L$2:$L$1658)),,1)),$L$2:$L$1658,0)))

    array-entered.
    Good luck.

  8. #8
    Registered User
    Join Date
    10-15-2008
    Location
    Coventry
    MS-Off Ver
    2003
    Posts
    70

    Re: Sumif and with a filter?

    #value!

    not sure why

  9. #9
    Forum Expert OnErrorGoto0's Avatar
    Join Date
    12-30-2011
    Location
    I DO NOT POST HERE ANYMORE
    MS-Off Ver
    I DO NOT POST HERE ANYMORE
    Posts
    1,655

    Re: Sumif and with a filter?

    Did you enter it with Ctrl+Shift+Enter?

  10. #10
    Registered User
    Join Date
    10-15-2008
    Location
    Coventry
    MS-Off Ver
    2003
    Posts
    70

    Re: Sumif and with a filter?

    no just ctrl+v

    tried c+s+e same thing

  11. #11
    Forum Expert OnErrorGoto0's Avatar
    Join Date
    12-30-2011
    Location
    I DO NOT POST HERE ANYMORE
    MS-Off Ver
    I DO NOT POST HERE ANYMORE
    Posts
    1,655

    Re: Sumif and with a filter?

    Select the cell with the formula, press f2, then Ctrl+Shift+Enter. Works in the sample you posted.

  12. #12
    Registered User
    Join Date
    10-15-2008
    Location
    Coventry
    MS-Off Ver
    2003
    Posts
    70

    Re: Sumif and with a filter?

    perfect!

    what does C+S+E do?

    another add on to this, is there anyway I can get (either by adding to my refresh macro) what is in the filter copied to the 'page' of my pivot table?

  13. #13
    Forum Expert OnErrorGoto0's Avatar
    Join Date
    12-30-2011
    Location
    I DO NOT POST HERE ANYMORE
    MS-Off Ver
    I DO NOT POST HERE ANYMORE
    Posts
    1,655

    Re: Sumif and with a filter?

    Ctrl+Shift+Enter makes it an array formula.

    Not entirely sure what you are referring to with that last question?

  14. #14
    Registered User
    Join Date
    10-15-2008
    Location
    Coventry
    MS-Off Ver
    2003
    Posts
    70

    Re: Sumif and with a filter?

    If you can see macro 3, I would like to add what it pastes to the front sheet A1, to the pivot 'page' (C1) When i have tried to paste this in i get an error you cannot change, move a part of........so I have to manually enter this in

    Thanks

    Attached.
    Attached Files Attached Files

  15. #15
    Forum Expert OnErrorGoto0's Avatar
    Join Date
    12-30-2011
    Location
    I DO NOT POST HERE ANYMORE
    MS-Off Ver
    I DO NOT POST HERE ANYMORE
    Posts
    1,655

    Re: Sumif and with a filter?

    I think perhaps you mean something similar to this?
    Please Login or Register  to view this content.

  16. #16
    Registered User
    Join Date
    10-15-2008
    Location
    Coventry
    MS-Off Ver
    2003
    Posts
    70

    Re: Sumif and with a filter?

    should i just replace my macro 3 with this?

  17. #17
    Forum Expert OnErrorGoto0's Avatar
    Join Date
    12-30-2011
    Location
    I DO NOT POST HERE ANYMORE
    MS-Off Ver
    I DO NOT POST HERE ANYMORE
    Posts
    1,655

    Re: Sumif and with a filter?

    Yes - it should do all of the same things I think plus setting the filter on the pivot table.

  18. #18
    Registered User
    Join Date
    10-15-2008
    Location
    Coventry
    MS-Off Ver
    2003
    Posts
    70

    Re: Sumif and with a filter?

    FANTASTIC! You saving me hours!

    Hopefully last thing, I want to be able to print 2 pages to pdf is this possible? I have got the following;

    Sheets(Array("Front Sheet £", "Backup")).Select
    ActiveWindow.SelectedSheets.PrintOut Copies:=1, ActivePrinter:= _
    "Adobe PDF", Collate:=True
    But it prints to 2 documents currently. What would be really cool is if it took the name to save it as the company name on the front sheet but 1 step at a time

  19. #19
    Forum Expert OnErrorGoto0's Avatar
    Join Date
    12-30-2011
    Location
    I DO NOT POST HERE ANYMORE
    MS-Off Ver
    I DO NOT POST HERE ANYMORE
    Posts
    1,655

    Re: Sumif and with a filter?

    I am afraid I know next to nothing about printing to PDF, other than that it is much easier on 2007+.

  20. #20
    Registered User
    Join Date
    10-15-2008
    Location
    Coventry
    MS-Off Ver
    2003
    Posts
    70

    Re: Sumif and with a filter?

    thanks for all your help.

+ 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