title: How to count the values in ranges in Excel
body: <p>I have two columns as shown below. Group values is 0,1,2,3,4 and scores is from 0 to 80. I want to count how many 0s (1s, 2s, 3s, 4s) are present for scores between 0 and 10; 10 and 20; 20 and 30 etc.</p>
  
  <p>I am thinking to use Excel pivot table. But I am stuck - how could I achieve this?</p>
  
  <pre><code>Group scores
  1   8.56163
  2   34.3649
  2   12.2291
  0   8.75357
  2   8.75967
  2   5.87806
  0   9.33751
  2   32.0303
  0   43.5567
  2   11.1044
  2   24.9266
  1   18.9314
  </code></pre>
  
  <p>-------- result should look like below --------</p>
  
  <pre><code>scores  group   count
  
  0-10    0        2
  0-10    1        1
  0-10    2        2
  0-10    3        0
  0-10    4        0
  
  10-20   0        0
  10-20   1        1
  10-20   2        2
  ...
  </code></pre>
  
  <p>------ PS I have solved this problem using <a href="/questions/tagged/matlab" class="post-tag" title="show questions tagged &#39;matlab&#39;" rel="tag">matlab</a>. But it would be nice to see someone do it in Excel.</p>
  
  <p>---------------- thanks for all the anwers. I really appreciate it. I have accepted the 1st answer. </p>