Author: Oscar Cronquist Article last updated on March 13, 2018

Question: I have two columns of data... A1-A10 contain a list of dates.

B1-B10 contain a value, AA, BB, CC, AA, DD, CC, etc.

I would like to count how many times each value in the B column occures in the
sheet, but only if it has occured in the past 90 days.

How would I do this?

Formula in A16:

=INDEX(Rng1, MATCH(0, COUNTIF(\$A\$15:A15, Rng1), 0)) + CTRL + SHIFT + ENTER

copied down as far as necessary.

Formula in B16:

=SUM(COUNTIF(A16, IF(Dts1>\$B\$13, Rng1, ""))) + CTRL + SHIFT + ENTER

copied down as far as necessary.

Calculate occurences in the past 90 days.xl

(Excel 97-2003 Workbook *.xls)

SUM(number1,[number2],)
Adds all the numbers in a range of cells

IF(logical_test;[value_if:true];[value_if_false])
Checks whether a condition is met, and returns one value if TRUE, and another value if FALSE

COUNTIF(range,criteria)
Counts the number of cells within a range that meet the given condition

MATCH(lookup_value;lookup_array; [match_type]
Returns the relative position of an item in an array that matches a specified value

INDEX(array,row_num,[column_num])
Returns a value or reference of the cell at the intersection of a particular row and column, in a given range