#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 04:08 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"