+ Reply to Thread
Results 1 to 6 of 6

Counting number of people who are new hires based on today's date.

  1. #1
    Registered User
    Join Date
    08-20-2012
    Location
    Houston, TX
    MS-Off Ver
    Excel 2012
    Posts
    4

    Question Counting number of people who are new hires based on today's date.

    Greetings,

    Looking for a formula that will count new hires, based on one year earlier from today's date.

    In column E, I have the date that people were hired. For example, 10/12/11.

    In column F, I would like an "x" to appear if that date is less than one year from today.

    If the date rolls over to more than one year, I would like the "x" to disappear.

    Thanks!

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Counting number of people who are new hires based on today's date.

    Try this formula in E2 copied down

    =IF(DATEDIF(D2,TODAY(),"y")=0,"x","")

    DATEDIF will count whole years so before 1 year is up it returns zero.....

    ......if you just want a count then rather than putting an "x" in each row and counting those you could get that will one formula, e.g.

    =COUNTIF(D:D,">"&EDATE(TODAY(),-12))
    Last edited by daddylonglegs; 08-20-2012 at 11:03 AM.
    Audere est facere

  3. #3
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Counting number of people who are new hires based on today's date.

    Hi wilsonmedic and welcome to the forum,

    Find the attached with your answer.
    Attached Files Attached Files
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  4. #4
    Registered User
    Join Date
    08-20-2012
    Location
    Houston, TX
    MS-Off Ver
    Excel 2012
    Posts
    4

    Re: Counting number of people who are new hires based on today's date.

    Perfect! That is great! Thanks!

  5. #5
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Counting number of people who are new hires based on today's date.

    Why don't I find DateDiff in my function list?

    I know I've seen DateDiff but it looks like it is in Access and not in Excel.
    http://www.techonthenet.com/access/f...e/datediff.php
    Last edited by MarvinP; 08-20-2012 at 11:16 AM.

  6. #6
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Counting number of people who are new hires based on today's date.

    There's a Datediff function in VBA, this is DATEDIF (with one F) - I don't think it's ever been officially explained but DATEDIF doesn't appear in the help files (except Excel 2000) or in function lists.....but you can use it by typing it in, see Chip's explanation here

+ 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