Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
rnd
Sub myrandomize()
Dim rng As Range, rng1 As Range Dim idex As Long Set rng = Range("C3:J3") Set rng1 = Range("C4:J4") idex = Int(Rnd() * 8 + 1) Range("F21") = Int((rng1(idex) - rng(idex) + 1) _ * Rnd + rng(idex)) End Sub If one or more of Range ("C3:C4") ("D3:D4") ("E3:E4") ("F3:F4") ("G3:G4") ("H3:H4") ("I3:I4" ("J3:J4") have no number how can I randomize only from the Range ("C3:C4") ("D3:D4") ("E3:E4") ("F3:F4") ("G3:G4") ("H3:H4") ("I3:I4" ("J3:J4") that have number? (There is always an number in both #3 and #4 if there is an number i one of them) /dalla -- Message posted from http://www.ExcelForum.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|