Here is the data and formulas I used. I put the results in a table located
at A10:A14. I also changed the Left column and top row of the table to
include only the lower n umber of the range.
the formula works by looking at the left column and comparing the number in
the cell with the number at the left column and the number in the left column
in the next row. Again in the top row it compares the cell with the number
in the top row and the number in the top row in the next column.
the formulas can be copied except in the last Row and the Last column which
are missing terms.
Table in A10:H14
0 1 1.5 2 2.5 3 4
0 0 0 0 0 1 1 0
41 0 0 0 0 0 0 1
81 0 0 0 0 0 0 0
121 0 0 0 0 0 1 0
B11:B1
=SUMPRODUCT(--($A$1:$A$4>=$A11),--($A$1:$A$4<$A12),--($B$1:$B$4>=B$10),--($B$1:$B$4<C$10)
=SUMPRODUCT(--($A$1:$A$4>=$A12),--($A$1:$A$4<$A13),--($B$1:$B$4>=B$10),--($B$1:$B$4<C$10)
=SUMPRODUCT(--($A$1:$A$4>=$A13),--($A$1:$A$4<$A14),--($B$1:$B$4>=B$10),--($B$1:$B$4<C$10))
=SUMPRODUCT(--($A$1:$A$4>=$A14),--($B$1:$B$4>=B$10),--($B$1:$B$4<C$10))
C11:c1
=SUMPRODUCT(--($A$1:$A$4>=$A11),--($A$1:$A$4<$A12),--($B$1:$B$4>=C$10),--($B$1:$B$4<D$10)
=SUMPRODUCT(--($A$1:$A$4>=$A12),--($A$1:$A$4<$A13),--($B$1:$B$4>=C$10),--($B$1:$B$4<D$10)
=SUMPRODUCT(--($A$1:$A$4>=$A13),--($A$1:$A$4<$A14),--($B$1:$B$4>=C$10),--($B$1:$B$4<D$10))
=SUMPRODUCT(--($A$1:$A$4>=$A14),--($B$1:$B$4>=C$10),--($B$1:$B$4<D$10))
D11
1
=SUMPRODUCT(--($A$1:$A$4>=$A11),--($A$1:$A$4<$A12),--($B$1:$B$4>=D$10),--($B$1:$B$4<E$10)
=SUMPRODUCT(--($A$1:$A$4>=$A12),--($A$1:$A$4<$A13),--($B$1:$B$4>=D$10),--($B$1:$B$4<E$10)
=SUMPRODUCT(--($A$1:$A$4>=$A13),--($A$1:$A$4<$A14),--($B$1:$B$4>=D$10),--($B$1:$B$4<E$10))
=SUMPRODUCT(--($A$1:$A$4>=$A14),--($B$1:$B$4>=D$10),--($B$1:$B$4<E$10))
E11:E1
=SUMPRODUCT(--($A$1:$A$4>=$A11),--($A$1:$A$4<$A12),--($B$1:$B$4>=E$10),--($B$1:$B$4<F$10)
=SUMPRODUCT(--($A$1:$A$4>=$A12),--($A$1:$A$4<$A13),--($B$1:$B$4>=E$10),--($B$1:$B$4<F$10)
=SUMPRODUCT(--($A$1:$A$4>=$A13),--($A$1:$A$4<$A14),--($B$1:$B$4>=E$10),--($B$1:$B$4<F$10))
=SUMPRODUCT(--($A$1:$A$4>=$A14),--($B$1:$B$4>=E$10),--($B$1:$B$4<F$10))
F11:f1
=SUMPRODUCT(--($A$1:$A$4>=$A11),--($A$1:$A$4<$A12),--($B$1:$B$4>=F$10),--($B$1:$B$4<G$10)
=SUMPRODUCT(--($A$1:$A$4>=$A12),--($A$1:$A$4<$A13),--($B$1:$B$4>=F$10),--($B$1:$B$4<G$10)
=SUMPRODUCT(--($A$1:$A$4>=$A13),--($A$1:$A$4<$A14),--($B$1:$B$4>=F$10),--($B$1:$B$4<G$10))
=SUMPRODUCT(--($A$1:$A$4>=$A14),--($B$1:$B$4>=F$10),--($B$1:$B$4<G$10))
G11:G1
=SUMPRODUCT(--($A$1:$A$4>=$A11),--($A$1:$A$4<$A12),--($B$1:$B$4>=G$10),--($B$1:$B$4<H$10)
=SUMPRODUCT(--($A$1:$A$4>=$A12),--($A$1:$A$4<$A13),--($B$1:$B$4>=G$10),--($B$1:$B$4<H$10)
=SUMPRODUCT(--($A$1:$A$4>=$A13),--($A$1:$A$4<$A14),--($B$1:$B$4>=G$10),--($B$1:$B$4<H$10))
=SUMPRODUCT(--($A$1:$A$4>=$A14),--($B$1:$B$4>=G$10),--($B$1:$B$4<H$10))
H11:H14
=SUMPRODUCT(--($A$1:$A$4>=$A11),--($A$1:$A$4<$A12),--($B$1:$B$4>=H$10))
=SUMPRODUCT(--($A$1:$A$4>=$A12),--($A$1:$A$4<$A13),--($B$1:$B$4>=H$10))
=SUMPRODUCT(--($A$1:$A$4>=$A13),--($A$1:$A$4<$A14),--($B$1:$B$4>=H$10))
=SUMPRODUCT(--($A$1:$A$4>=$A14),--($B$1:$B$4>=H$10))