+ Reply to Thread
Results 1 to 5 of 5

Single column countif with moving range based on today's date

  1. #1
    Registered User
    Join Date
    08-29-2013
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2007
    Posts
    52

    Single column countif with moving range based on today's date

    Good morning

    I'm trying to create a COUNTIF statement that will count every time a string "ABS" appears in a date range. But I need the date range to roll based on today's date, so something like this = COUNTIF(TODAY()-365:TODAY(),"ABS"). I know the range is invalid, I'm not sure the proper syntax to make this work. So I have a column with all the dates listed (A4:A734), and a row with names (B1:GT1). I need a formula in each column to count every time ABS appears in that same column within a year from todays date.

    I have attached the worksheet.Scheduling workbook.xlsx

    Is there anyone out there who can please help me?

  2. #2
    Forum Guru Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Single column countif with moving range based on today's date

    I didn't look at your file (too big!)

    Maybe something like this...

    =COUNTIFS(A4:A734,">="&EDATE(TODAY(),-12),B4:B734,"ABS")
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Single column countif with moving range based on today's date

    Try
    =COUNTIFS(B$4:B$734,"abs",$A$4:$A$734,">="&TODAY()-365,$A$4:$A$734,"<="&TODAY())

    Although, today-365 may not be the best way to go back a year...
    Some years have 366 days..

    This might be more accurate
    =COUNTIFS(B$4:B$734,"abs",$A$4:$A$734,">="&EDATE(TODAY(),-12),$A$4:$A$734,"<="&TODAY())

  4. #4
    Registered User
    Join Date
    08-29-2013
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2007
    Posts
    52

    Re: Single column countif with moving range based on today's date

    Thanks this works great.

  5. #5
    Forum Guru Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Single column countif with moving range based on today's date

    You're welcome. We appreciate 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] COUNTIF anumber of entries in a date range 14-30 days before TODAY?
    By HeathWilD in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-31-2015, 05:47 PM
  2. Replies: 4
    Last Post: 09-12-2013, 11:32 PM
  3. [SOLVED] Date Filter based on Cell Input - single date or range of dates
    By babaloo in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-23-2012, 10:32 AM
  4. Replies: 6
    Last Post: 08-08-2011, 08:32 AM
  5. Display a Value based on Today's Date in Date Range
    By barella in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-12-2010, 06:25 AM

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