random number results

M

mcmil

i have random numbers generating from 1-100 on the same number of cells
(h:1-h:100). what i would like to do is see how many times a number comes up
in those one hundred cells and display the results in an another cell with
the corresponding number in it. ex. lets say that 50 comes up 10 times in the
hundred cells. well i'll have cells prenumbered with 1-100 above them and the
results would go into them according to how many times a specific number
shows up so the cell with 50 with have 10 under it.
is this confusing? if so im sorry i'm kind of new and need generating
numbers often?
i'd appreciate any help. thanks.
 
P

Peo Sjoblom

=COUNTIF(A1:A100,50)

will count 50

--
Regards,

Peo Sjoblom

(No private emails please)
 
R

Ragdyer

Use the Countif() function.

=COUNTIF($H$1:$H$100,1)
=COUNTIF($H$1:$H$100,2)

You could *automatically* increment the number to count (1, 2, ...),
By replacing it with ROW(), which will automatically increase, as you copy
the formula down a column.
=COUNTIF($H$1:$H$100,ROW(A1))

If you are going to copy across columns, along a row, you could increment
the "count" number using Column().
=COUNTIF($H$1:$H$100,COLUMN(A:A))

For clarity, you would of course, enter these formulas next to a
pre-numbered row or column .
 
M

mcmil

thanks alot i really appreciate the help.

Ragdyer said:
Use the Countif() function.

=COUNTIF($H$1:$H$100,1)
=COUNTIF($H$1:$H$100,2)

You could *automatically* increment the number to count (1, 2, ...),
By replacing it with ROW(), which will automatically increase, as you copy
the formula down a column.
=COUNTIF($H$1:$H$100,ROW(A1))

If you are going to copy across columns, along a row, you could increment
the "count" number using Column().
=COUNTIF($H$1:$H$100,COLUMN(A:A))

For clarity, you would of course, enter these formulas next to a
pre-numbered row or column .
 
W

William Benson

I used the below plus some VBA on the worksheet's recalculate event to keep
track of the maximum number of repeated numbers. I let it loop 100,000 times
and can't get the same number from 1-100 to repeat more than 9 times. I
think I have too much time on my hands...

:)
 
Top