PDA

View Full Version : COUNTIFS and DatedIF Combo



x_stine
07-20-2013, 02:26 AM
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!

Excel Fox
07-20-2013, 02:57 AM
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.

x_stine
07-20-2013, 03:35 AM
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.

1008

x_stine
07-20-2013, 10:20 PM
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?