+ Reply to Thread
Results 1 to 2 of 2

Countif values meets date criteria

  1. #1
    Registered User
    Join Date
    04-28-2009
    Location
    Washington, DC
    MS-Off Ver
    Excel 2003
    Posts
    4

    Countif values meets date criteria

    I would like to count the number of appointments in a row that occur following a first appointment based on how soon after they occur (within 90 days, between 91-180 days, 181-270 days, and 271-365 days).

    Column A is client number
    Column B is initial appointment date
    Column C, etc. are dates of subsequent appointments

    A B C D E F
    1 11/2/98 12/3/98 3/4/99 9/5/99 10/25/99
    2
    3

    So for the sample above the counts for each category would be 1 appointment occurred within 90 days after 11/2/98, 1 occurred between 91-180 days after 11/2/98, and 2 occurred 271-365 days after 11/2/98.

    I have attached a sample of what I'm trying to do. Suggestions?
    Attached Files Attached Files

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Countif values meets date criteria

    A normal COUNTIF() formula seems to give me the results you want. You just have to remove matches made in earlier columns.

    H2:
    =COUNTIF($C2:$F2,"<="&$B2+90)

    I2:
    =COUNTIF($C2:$F2,"<="&$B2+180)-SUM($H2:H2)

    J2:
    =COUNTIF($C2:$F2,"<="&$B2+270)-SUM($H2:I2)

    K2:
    =COUNTIF($C2:$F2,"<="&$B2+365)-SUM($H2:J2)
    Attached Files Attached Files
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

+ 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