1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: How to count the number of occurences of an integer in excel?

  1. May 31, 2012 #1
    1. The problem statement, all variables and given/known data
    I have a thousand random numbers generated between -100 and 100 and want to count the number of occurences of each integer. I know i can use the COUNTIF function, but for so many numbers it takes way too long. Is there a way to create a loop in excel that can do this or will i just have to use ranges (eg. occurences between 0 and 10). For the accuracy i want to count each number individually.


    2. Relevant equations

    3. The attempt at a solution
  2. jcsd
  3. May 31, 2012 #2


    User Avatar

    Staff: Mentor

    Two suggestions:
    1. Write a macro to do it.
    2. Use the FREQUENCY array function to count them into "bins" of unit size (or any size you like for that matter).

    For 2 you will probably have to add an offset to all the values (100 in your case) so that all the data values will be positive.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook