Question

Hi look at some topics here could not find one that meets what I need to do.

I have a SharePoint list which I open in Excel(2010) in SharePoint I have created a calculated field that counts how days have passed between to dates. in excel these columns are "M" and "N". My calculated column in excel is "T"

This made the calculation in excel simple. which calculate how many days have passed that is less than 6 (days).

=COUNTIF(Data!$T:$T,"<"& 6) 

This give me overall calculation for 12 months. What I need to do is break it down per months. for example: how many days pass that is less than 6 in Nov. my date column "M" so I tried

  =COUNTIF(Data!$T:$T,"<"&6&"AND"& TEXT(Data!$M:$M,"mmm") = "Nov")

This give me a count of zero which I know is not correct. so I was wondering what the best way to add the second columns criteria ?

Was it helpful?

Solution

Try this

=SUMPRODUCT((TEXT(Data!$M:$M,"mmm")="Nov")*(Data!$T:$T<6))

enter image description here

OTHER TIPS

As you have Excel 2010, you can use the more powerful COUNTIFS

=COUNTIFS(Data!$T:$T,"<6",Data!$M:$M,">="&DATE(2013,11,1),Data!$M:$M,"<"&DATE(2013,12,1))

The DATE calculation can also reference cells, so you could change the count to this: (split into lines for readability)

=COUNTIFS(Data!$T:$T,"<6",
          Data!$M:$M,">="&DATE(2013,MonthCell,1),
          Data!$M:$M,"<"&DATE(2013,MonthCell+1,1))
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top