Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
mcmil
 
Posts: n/a
Default 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.
  #2   Report Post  
Peo Sjoblom
 
Posts: n/a
Default

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


  #3   Report Post  
Ragdyer
 
Posts: n/a
Default

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.


  #4   Report Post  
mcmil
 
Posts: n/a
Default

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.



  #5   Report Post  
William Benson
 
Posts: n/a
Default

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.







  #6   Report Post  
Ragdyer
 
Posts: n/a
Default

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.




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Seed numbers for random number generation, uniform distribution darebo Excel Discussion (Misc queries) 3 April 21st 23 09:02 PM
Excel random number JJ Excel Discussion (Misc queries) 2 May 4th 05 01:19 PM
Excel 2003 random number generator JJ Excel Discussion (Misc queries) 1 May 4th 05 01:02 PM
VB Random Number Generation/Insertion/NextWorksheet Craig Excel Discussion (Misc queries) 4 February 27th 05 10:00 PM
Random Number Questions Greegan Excel Worksheet Functions 1 January 5th 05 02:00 AM


All times are GMT +1. The time now is 07:21 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"