rnd

D

dallas

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top