Author: Oscar Cronquist Article last updated on December 06, 2010

Most common value between two dates in a range

Array formula in D17:

=INDEX(C3:G12, MAX(1*(IF(MAX(IF((B3:F12<=$D$15)*(B3:F12>=$D$14), COUNTIF(C3:G12, C3:G12), 0))=COUNTIF(C3:G12, C3:G12), (ROW(C3:G12)-MIN(ROW(C3:G12))+1), 0))), (MAX(IF(MAX(IF((B3:F12<=$D$15)*(B3:F12>=$D$14), COUNTIF(C3:G12, C3:G12), 0))=COUNTIF(C3:G12, C3:G12), (ROW(C3:G12)-MIN(ROW(C3:G12))+1)+((COLUMN(C3:G12)-MIN(COLUMN(C3:G12))+1)/16384), 0))-MAX(1*(IF(MAX(IF((B3:F12<=$D$15)*(B3:F12>=$D$14), COUNTIF(C3:G12, C3:G12), 0))=COUNTIF(C3:G12, C3:G12), (ROW(C3:G12)-MIN(ROW(C3:G12))+1), 0))))*16384) + CTRL + SHIFT + ENTER

Download excel file for this tutorial.

Most common value between two dates in a range.xls
(Excel 97-2003 Workbook *.xls)

Functions in this article:

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

Returns a value or reference of the cell at the intersection of a particular row and column, in a given range

ROW(reference) returns the rownumber of a reference

COLUMN(reference) returns the column number of a reference

Checks whether a condition is met, and returns one value if TRUE, and another value if FALSE

Returns the largest value in a set of values. Ignores logical values and text.

Counts the number of cells within a range that meet the given condition

Related articles: