I want to build a histogram of a set of values. So I need to get the number of values that are in a considered interval.

Say my values are on a sheet named 'LIST' in column A. On current sheet, I have in column 1 and 2 the lower and upper bound of the interval.

With `=COUNTIF(LIST!$A:$A,">="&A1)`

I am able to get the number of values that are higher then the value in A1.

But how do I get the number of values that are both lower than A2 and higher than A1. The following:
`=COUNTIF(LIST!$A:$A,AND(">="&A1,"<"&B1))`

throws me an error.

**Update**:

I have in a seperate worksheet (called List) the following values in Column A:

ColumnA

1

2

3

10

11

12

10

11

12

Then I want in my sheet to show (column A and B are values which have been entered manually. I'm looking for a formula for column C which will display results like:

```
ColA ColB ColC
0 5 3
5 10 0
10 15 6
15 20 0
```