Home |
Search |
Today's Posts |
#1
|
|||
|
|||
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
|
|||
|
|||
=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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Seed numbers for random number generation, uniform distribution | Excel Discussion (Misc queries) | |||
Excel random number | Excel Discussion (Misc queries) | |||
Excel 2003 random number generator | Excel Discussion (Misc queries) | |||
VB Random Number Generation/Insertion/NextWorksheet | Excel Discussion (Misc queries) | |||
Random Number Questions | Excel Worksheet Functions |