+ Reply to Thread
Results 1 to 6 of 6

Using COUNTIF to number of in certain date ranges

  1. #1
    Registered User
    Join Date
    05-07-2012
    Location
    edinburgh
    MS-Off Ver
    Excel MAC:2011
    Posts
    3

    Using COUNTIF to number of in certain date ranges

    I need some help to create a formula that will count the number of hits between certain date ranges.

    The dates are stored in the format below and are in cells E5:E87

    (abstract of data)
    01/04/50
    12/11/72
    22/11/66
    15/11/72
    02/03/53
    01/12/70
    30/09/58

    What i want to do i i make a graph of with the following rules

    People in their...
    20 = 1992 - 2002 (return number of hits between the date ranges)
    30 = 1982 - 1992
    40 = 1972 - 1982
    50 = 1962 - 1972
    60 = 1952 - 1962
    70 = 1942 - 1952
    80 = 1932 - 1942
    90 = 1922 - 1932

    Could some one help me with the formula and i think i have to use wildcards to just take the year and ignore the day and month.

    Any help would be much appreciated.

    Thanks.

  2. #2
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Using COUNTIF to number of in certain date ranges

    Hi and welcome to the forum.

    Your request is not clear(At least, to me) Could you explai a little more or better to upload a small sample workbook?

    To get the year of a date, use this.

    =YEAR(A1)
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  3. #3
    Registered User
    Join Date
    05-07-2012
    Location
    edinburgh
    MS-Off Ver
    Excel MAC:2011
    Posts
    3

    Re: Using COUNTIF to number of in certain date ranges

    Screen Shot 2012-05-07 at 1.01.44 PM.jpg
    Ok what i need to so is count how many people are in their 30's, 40's, 50s...etc. I figured i could have an formula for each age groups.

    so basically in simple terms for people that are in their 30's look at column E5:E87 and count the amount of people who's birth year is between 82 and 92 and then return amount of matches.

    and put answer in cell L106 Screen Shot 2012-05-07 at 1.04.57 PM.png


    sorry for the confusion i'am not the best at explaining excel as i very new to this.
    Last edited by runtheyards; 05-07-2012 at 08:17 AM.

  4. #4
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Using COUNTIF to number of in certain date ranges

    Try this

    =SUMPRODUCT((YEAR(E5:E87)<=1992))*(YEAR(E5:E87)>=1982))))

    OR

    Please, upload a sample WORKBOOK. Not a picture.

  5. #5
    Registered User
    Join Date
    05-07-2012
    Location
    edinburgh
    MS-Off Ver
    Excel MAC:2011
    Posts
    3

    Re: Using COUNTIF to number of in certain date ranges


  6. #6
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Using COUNTIF to number of in certain date ranges

    Using a helper column, i think you have your result.

    Please Login or Register  to view this content.
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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