ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   random number results (https://www.excelbanter.com/excel-worksheet-functions/29317-random-number-results.html)

mcmil

random number results
 
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.

Peo Sjoblom

=COUNTIF(A1:A100,50)

will count 50

--
Regards,

Peo Sjoblom

(No private emails please)


"mcmil" wrote in message
...
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.



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 .

--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
"mcmil" wrote in message
...
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.



mcmil

thanks alot i really appreciate the help.

"Ragdyer" wrote:

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 .

--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
"mcmil" wrote in message
...
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.




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...

:-)


"mcmil" wrote in message
...
thanks alot i really appreciate the help.

"Ragdyer" wrote:

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 .

--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
"mcmil" wrote in message
...
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.






Ragdyer

And I appreciate the feed-back.
--
Regards,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
"mcmil" wrote in message
...
thanks alot i really appreciate the help.

"Ragdyer" wrote:

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 .

--
HTH,

RD


--------------------------------------------------------------------------

-
Please keep all correspondence within the NewsGroup, so all may benefit

!

--------------------------------------------------------------------------

-
"mcmil" wrote in message
...
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.






All times are GMT +1. The time now is 03:09 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com