+ Reply to Thread
Results 1 to 4 of 4

Update COUNTIF Formula When Using Tables

  1. #1
    Registered User
    Join Date
    07-25-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    48

    Update COUNTIF Formula When Using Tables

    I'd like the formulas to update based on the filtered data I have in my table. In the example, if I choose under column C "Date Shipped" all January dates I would want the quantities in A2:A4 to update. Then if I choose February update again and so on. I've been using a variety of various attempts but nothing has worked. The example sheet is attached and thanks in advance!
    Attached Files Attached Files
    Last edited by robstark; 07-14-2018 at 07:40 PM.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Update COUNTIF Formula When Using Tables

    Your 2-4 days is wrong. The way you have that formula set up...
    =(COUNTIF(F7:F12,">=2")+COUNTIF(F7:F12,"<4"))
    it is counting all values >=2 PLUS all values <4
    If you break it down into 2 formulas you will see 4 + 4

    Try these instead
    A2=SUMPRODUCT(SUBTOTAL(3,OFFSET($A$7,ROW($A$7:$A$12)-ROW($A$7),)),--($F$7:$F$12<=1))
    A3=SUMPRODUCT(SUBTOTAL(3,OFFSET($A$7,ROW($A$7:$A$12)-ROW($A$7),)),--(F7:F12>=2),--(F7:F12<=4))
    A4=SUMPRODUCT(SUBTOTAL(3,OFFSET($A$7,ROW($A$7:$A$12)-ROW($A$7),)),--($F$7:$F$12>=5))

    Keep in mind you have 6 entries, so te combination of ANY counts that you do, cannot exceed that, else you are including entries more than once
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    07-25-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    48

    Re: Update COUNTIF Formula When Using Tables

    Thanks- this is perfect!

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Update COUNTIF Formula When Using Tables

    Happy to help and thanks for the feedback

+ 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. [SOLVED] Sumif or countif formula update
    By ZBEER in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-23-2018, 08:05 AM
  2. Dynamically Update CountIf Formula Based On Nested List
    By SamuraiSam83 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-13-2015, 09:09 PM
  3. How to update a lot of pivot tables at once
    By pgft in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 11-11-2014, 06:09 AM
  4. Pivot tables update with VBA
    By sehested in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-23-2014, 07:26 PM
  5. update "CountIF" formula
    By missy22 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-12-2013, 12:03 PM
  6. How to update 2 tables at the same time?
    By ravikiran in forum Access Tables & Databases
    Replies: 4
    Last Post: 09-25-2012, 08:47 AM
  7. Replies: 5
    Last Post: 01-20-2008, 04:37 PM

Tags for this Thread

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