Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I need to write a macro for Excel that will keep on generating a rando
number until a condition is met. The values compared are on th spreadsheet and I dont know how to call them in VB. Any help is greatly at all is welcome -- Message posted from http://www.ExcelForum.com |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Sub AABB() Range("B1") = Int(Rnd() * 1000 + 1) If IsNumeric(Range("C1")) Then If Range("C1") < 1000 And Range("C1") 1 Then Do While Range("B1") Range("C1") Range("B1") = Int(Rnd() * 1000 + 1) Loop End If End If End Sub as an example. -- Regards, Tom Ogilvy "mrmark " wrote in message ... I need to write a macro for Excel that will keep on generating a random number until a condition is met. The values compared are on the spreadsheet and I dont know how to call them in VB. Any help is greatly at all is welcome. --- Message posted from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
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) | |||
random number generation: loop | Excel Programming |