1
votes

I am able to count how many cells there are in Column D with year 2015. And I am able to count how many cells there are in Column L that are 15 or greater. However, I'm looking to combine these two formulas but I don't know how.

The formula I use to count the years is:

=SUMPRODUCT(--(TEXT('Sheet1'!D:D,"YYYY")="2015"))

The formula for counting 15 or greater is:

=COUNTIF('Sheet1'!L:L,">=15")

Can someone please provide a way I can combine these two formulas so I can count how many instances there was 15 or greater for the year 2015?

Thanks

1

1 Answers

1
votes

COUNTIFS() with an S allows the ability of multiple criteria and you can bracket the dates:

=COUNTIFS('Sheet1'!L:L,">=15",'Sheet1'!D:D, ">=" & DATE(2015,1,1),'Sheet1'!D:D, "<=" & DATE(2015,12,31))

enter image description here


If your dates are actually text strings that look like dates you can do:

=COUNTIFS('Sheet1'!L:L,">=15",'Sheet1'!D:D,"*2015*")