+ Reply to Thread
Results 1 to 3 of 3

Using Countif and Subtotal based on date older than 2 years ago

  1. #1
    Registered User
    Join Date
    07-09-2014
    Location
    Scotland
    MS-Off Ver
    2010
    Posts
    5

    Using Countif and Subtotal based on date older than 2 years ago

    Hi, Im trying to find a formula that combines countif and subtotal as i have a filter used.

    Currently have the formula: =COUNTIF(B:B,"<"&TODAY()-730)
    but would like to not include the filtered data.

    Any suggestions would be greatly appreciated.
    Thanks.

  2. #2
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,156

    Re: Using Countif and Subtotal based on date older than 2 years ago

    welcome to the forum. try something like:
    =SUMPRODUCT((B3:B10<TODAY()-730)*SUBTOTAL(3,OFFSET(B3,ROW(B3:B10)-ROW(B3),)))

    it's explained in the file of my link below*Tips & Tutorials I Compiled, sheet 10
    also, when using SUMPRODUCT or other array formulas, do not reference the whole column as it will affect performance

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  3. #3
    Registered User
    Join Date
    07-09-2014
    Location
    Scotland
    MS-Off Ver
    2010
    Posts
    5

    Re: Using Countif and Subtotal based on date older than 2 years ago

    Thank you for this.
    I noticed the 'offset' part in other threads with similar problems but I never knew how to adapt it as i didnt really understand it.

    The only reason i was using entire column as it is linked to a macro which copies rows from another sheet therefore the list is ever changing.

    Nevertheless thanks for the help

+ 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] Date older than 3 years? (yes/no)
    By wintheranders in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-19-2013, 06:00 AM
  2. [SOLVED] Age based on DOB; Accounts for leap years. Years old if >2, Months if <2 years old.
    By sharpmel in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 01-17-2013, 04:20 PM
  3. [SOLVED] Conditional Formatting. Anything 4.5 years old + older from todays date needs Highlight.
    By themanwithnoshoes in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-25-2012, 11:58 AM
  4. [SOLVED] =Subtotal(countif,Range); Subtotal and countif in 1 formula [SOLVED]
    By thomas.mapua in forum Excel General
    Replies: 5
    Last Post: 01-06-2012, 11:33 AM
  5. Highlighting dates older than 4 years
    By james1234 in forum Excel General
    Replies: 2
    Last Post: 04-04-2010, 07:15 AM

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