Excel formula to count cells between two values
Count cells between two values in a column
Formula in D15:
=ABS(MATCH(C12, tbl, 0)-MATCH(C13, tbl, 0))-1 + ENTER
Named ranges
tbl (A1:A10)
Count cells between two values in a row
Formula in D23:
=ABS(MATCH(C20, tbl_row, 0)-MATCH(C21, tbl_row, 0))-1 + ENTER
Named ranges
tbl_row (A18:E18)
Download excel sample file for this tutorial.
formula to count cells between two values.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
ABS(number)
Returns the absolute value of a number, a number without its sign.
Related posts:
- Count number of times a string exist in multiple cells using excel formula
- Count unique distinct values in three columns combined in excel
- Count duplicate distinct values in a column in excel
- Count unique distinct values in two columns in excel
- Count unique distinct values in a column in excel
- Count unique values and unique distinct values in two ranges combined
- Count unique distinct values in two columns with date criteria in excel
- Count unique values and unique distinct values in three ranges combined in excel
- Sorting numbers and text cells also removing blanks using array formula in excel
- Sorting text cells using array formula in excel




January 23rd, 2010 at 11:23 pm
How about this array formula?
=ROUND(SUM(MATCH(C12:C13,A1:A10,0)/2),0)