+ Reply to Thread
Results 1 to 2 of 2

Using greater than or less than today as a criteria in a countifs

  1. #1
    Registered User
    Join Date
    01-04-2014
    Location
    Toronto
    MS-Off Ver
    Excel 2007
    Posts
    15

    Thumbs up Using greater than or less than today as a criteria in a countifs

    So I want to be able to count cells that contain the word Vac, but only if the date of the column is after the current date.

    Thoughts? I am using excel 2007

    Thanks
    Jan 1 Jan 2 Jan 3 Jan 4 Jan 5 Jan 6 Jan 7 Jan 8 Jan 9
    person 1 NY1
    person 2
    person 3
    person 4 Vac Vac Vac Vac Vac
    person 5
    person 6
    person 7
    person 8

  2. #2
    Valued Forum Contributor
    Join Date
    03-29-2013
    Location
    United Kingdom
    MS-Off Ver
    Office/Excel 2013
    Posts
    1,749

    Re: Using greater than or less than today as a criteria in a countifs

    You can adjust the size of the range for counting vacations based on two dates by using the Offset formula.

    e.g.
    =OFFSET(CalStartDate,1,CalToday-CalStartDate,10,COUNT($B$10:$ZZ$10)-(CalToday-CalStartDate))

    CalstartDate is a named cell containing the first date of your vacation calendar.
    CalToday is a named cell containing the current date.

    Assuming your table headers (dates) are in row 10, Names are in column A and there are 10 people listed then the above offset formula would return the range of cells after today for the whole table.
    Put the function in named ranges using the name manager and call it "CalcRange"

    The countif formula then becomes =COUNTIF(CalcRange,"=Vac") to count all vacations after today

    See example below

    DynRangeEx.xlsx
    Last edited by AndyLitch; 01-05-2014 at 02:55 AM.
    Elegant Simplicity............. Not Always

+ 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. Help With COUNTIFS Using Greater Than Criteria
    By amerain in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 06-04-2013, 11:31 AM
  2. [SOLVED] COUNTIFS using (TODAY()-5days) Filter or equivalent
    By Stymple Tweed in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-15-2013, 08:34 AM
  3. [SOLVED] If Greater then today or Blank = Active
    By rmharrison in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-11-2012, 12:34 PM
  4. Average if is not greater than today
    By jermsalerms in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-22-2006, 05:40 PM
  5. COUNT greater than TODAY() - HELP !
    By bevy in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 01-21-2005, 03:02 PM

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