close

I am trying to count the number of occurences of a text item within a date
range. I have tried using the COUNTIF function, but since my date is in
DD/MM/YYYY format I am unable to single out the year (ex quot;2004quot;). Example,
total number of Safety Classes in 2004 - with one column as the date and
another column listing the safety class. I can count the total number of
occurences of the safety class, I'm just having issues coordinating it with a
date range.

=SUMPRODUCT(--(YEAR(A2:A100)=2004),--(B2:B100=quot;Safetyclass1quot;))

will count year 2004 in A where B is safetyclass1
adapt to fit your requirements

--

Regards,

Peo Sjoblom

quot;tcolbertquot; gt; wrote in message
...
gt; I am trying to count the number of occurences of a text item within a date
gt; range. I have tried using the COUNTIF function, but since my date is in
gt; DD/MM/YYYY format I am unable to single out the year (ex quot;2004quot;). Example,
gt; total number of Safety Classes in 2004 - with one column as the date and
gt; another column listing the safety class. I can count the total number of
gt; occurences of the safety class, I'm just having issues coordinating it
with a
gt; date range.
It worked perfectly. Thanks!

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 software 的頭像
    software

    software

    software 發表在 痞客邦 留言(0) 人氣()