Results 1 to 4 of 4

Thread: COUNTIFS and DatedIF Combo

  1. #1
    Junior Member
    Join Date
    Jul 2013
    Posts
    3
    Rep Power
    0

    COUNTIFS and DatedIF Combo

    Hi!
    I am trying to do a Count if a range = a criteria and another criteria if it is less than a year.

    In C1 I have today's date ( a formula)

    E4 I have type

    F4 I have a date (format 5/16/12)

    H4 I have a formula that calculates the year, month and day using C1 and F4 for each row

    (=IF(DATEDIF($F4,$C$1,"y")=0,"",DATEDIF($F4,$C$1," y")&" years ")&IF(DATEDIF($F4,$C$1,"ym")=0,"",
    DATEDIF($F4,$C$1,"ym")&" months ")&DATEDIF($F4,$C$1,"md")&" days")


    I am trying to calculate in a table:

    < 1 years that meet crieria 1

    1-3 years that meet crieria 1

    3-5 years that meet crieria 1

    5-10 years that meet crieria 1

    < 10 years that meet crieria 1



    I tried using column H but it wasn't correct.

    I was able to use =SUMPRODUCT(1*(DATEDIF($F$4:$F$261,$C$1,"y")<1)) but I am not able to add the second criteria.


    Is it possible to combine the DATEIF and COUNTIFS function?

    Thank you!

  2. #2
    Administrator Excel Fox's Avatar
    Join Date
    Mar 2011
    Posts
    1,402
    Rep Power
    10
    Would be better if you can upload a sample workbook that represents the actual data, and on that, show what the expected output should be.
    A dream is not something you see when you are asleep, but something you strive for when you are awake.

    It's usually a bad idea to say that something can't be done.

    The difference between dream and aim, is that one requires soundless sleep to see and the other requires sleepless efforts to achieve

    Join us at Facebook

  3. #3
    Junior Member
    Join Date
    Jul 2013
    Posts
    3
    Rep Power
    0
    Quote Originally Posted by Excel Fox View Post
    Would be better if you can upload a sample workbook that represents the actual data, and on that, show what the expected output should be.
    sample.xlsx

  4. #4
    Junior Member
    Join Date
    Jul 2013
    Posts
    3
    Rep Power
    0
    Quote Originally Posted by Excel Fox View Post
    Would be better if you can upload a sample workbook that represents the actual data, and on that, show what the expected output should be.
    uploaded file. any ideas on an approach to take?

Similar Threads

  1. Recommendation: Do not use the undocumented DATEDIF function
    By Rick Rothstein in forum Rick Rothstein's Corner
    Replies: 4
    Last Post: 05-16-2015, 10:06 PM
  2. One userform and 60 Combo Boxes
    By k0st4din in forum Excel Help
    Replies: 11
    Last Post: 04-25-2013, 09:55 AM
  3. Error when trying to use COMBO BOXES PADLOCK
    By marreco in forum Excel Help
    Replies: 2
    Last Post: 12-28-2012, 04:15 AM
  4. Replies: 11
    Last Post: 10-07-2012, 12:05 AM
  5. Excel Datedif - Days of February
    By Excelfun in forum Excel Help
    Replies: 6
    Last Post: 06-10-2012, 02:32 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •