date - How to count occurrences of each year in Excel? -


i want count cells have specific year in date/string. have problem formula works if it's valid date, cells have month or day missing or totally blank.

here examples of values want able count:

2002-07-? 2010-11-27 2009-10-21 2009-10-21 2004-12-20   2004-11-07 2010-11-? 2004-09-17 2000-?-? 2005-04-26 

this how want output be:

unknown 2 2000    1 2001    0 2002    1 2003    0 2004    3 2005    1 2006    0 2007    0 2008    0 2009    2 2010    2 

if use =countif(a1:a12;"2000*") cells strings. there way count both dates , strings?

use helper column , use following formula extract year:

=if(istext(a1);left(a1;4);text(a1;"yyyy")) 

then use existing =countif() formula without wildcard * argument:

=countif(a1:a12;"2000") 

Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -