Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
Hi all,
My query relates to what I think will probably involve the COUNTIFS function. Specifically, I need to count the number of cells that fall within a range of values when those subsequent to each other are subtracted. For example, in a column containing: 300.5 301.34 301.4 305.61 309.8 309.85 I need to count those numbers that are subsequent to one another, that when subtracted, equate to less than 0.1. So the output for the above example would be 2 (as the difference between 301.34 and 301.4, and 309.8 and 309.85, is less than 1). Any help would be massively appreciated! |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
"charlie111" wrote:
For example, in a column containing: 300.5 301.34 301.4 305.61 309.8 309.85 I need to count those numbers that are subsequent to one another, that when subtracted, equate to less than 0.1. So the output for the above example would be 2 (as the difference between 301.34 and 301.4, and 309.8 and 309.85, is less than 1). Suppose those numbers are in A1:A6, and they are in ascending order (as above). =SUMPRODUCT(--(A2:A6-A1:A5<0.1)) However, due to arithmetic anomalies, it would be prudent to write: =SUMPRODUCT(--(ROUND(A2:A6-A1:A5,2)<0.1)) if the numbers are intended to be accurate to 2 decimal places. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Retrieve numbers that meet criteria | Excel Programming | |||
Sum #s in a column that meet criteria based on another value in ro | Excel Discussion (Misc queries) | |||
add numbers if they meet criteria...? | Excel Worksheet Functions | |||
how do I count the numbers of row that meet 2 criteria | Excel Worksheet Functions | |||
Formula that only adds numbers that meet specific criteria | Excel Discussion (Misc queries) |