Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
many thanks - that is just great - last question (I hope)
can you suggest how to chnage it so that if the selected random cell value is between 0.99 and 751 then the formatt of cell E14 (sheet3) should be Code: Selection.Interior.ColorIndex = 41 Selection.Font.ColorIndex = 2 if it falls between 999 and 250001 then it should be Code: Selection.Interior.ColorIndex = 3 Selection.Font.ColorIndex = 2 ...any ideas if this possible "Mike" wrote: This works by randomely choosing the row nimber to get the mimber from and then writing whatever was found in that cell to E14 Mike Sub getnumber() x = Int((52 - 32 + 1) * Rnd + 32) mynumber = Worksheets("sheet1").Cells(x, 18).Value Worksheets("sheet1").Cells(14, 4).Value = mynumber End Sub Mike "Anthony" wrote: Hi, can somebody give some code or a formula to chose a number at random from a list in range R32:R52, then place this randomly chosen number in cell E14 of sheet3 and finally remove this number from the list in the original range. thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Addding a Random number to a fixed number..... | Excel Discussion (Misc queries) | |||
How can I match a random number with closest number from sequence? | Excel Worksheet Functions | |||
same number appears in a random number generator | Excel Worksheet Functions | |||
Generating (in a random order)each number once from a given number | Excel Worksheet Functions | |||
How do I find random number in list of random alpha? (Position is. | Excel Discussion (Misc queries) |