Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 04-09-2013, 10:10 PM
Sajj Sajj is offline Filling cells with random numbers using loops? (VBA) Windows 8 Filling cells with random numbers using loops? (VBA) Office 2007
Novice
Filling cells with random numbers using loops? (VBA)
 
Join Date: Apr 2013
Posts: 3
Sajj is on a distinguished road
Default Filling cells with random numbers using loops? (VBA)

Hello,

I need to write a mcro that fills all the cells in the block range of cell with random numbers between 0 and 1.

so far I've done this:


Sub number()
Dim x As Double



For x = 1 To 10


Workbooks("book1").Sheets("Sheet1").Range("A1:f20" ).Offset(x, j).Value = Rnd()


Next
End Sub

the problem with my macro is having one random number on almost the entire determined range.
Reply With Quote
 

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to fill a cell with random numbers to do calculations? zanat0s Excel 1 06-13-2011 10:33 AM
Filling cells with random numbers using loops? (VBA) filling multiple cells whislt using Filter VinceO Excel 1 05-09-2011 06:38 AM
Display Random Numbers as Transition greenbutton PowerPoint 0 03-09-2011 04:43 PM
Filling cells with random numbers using loops? (VBA) Powerpoint loops, but not to beginning imeister PowerPoint 1 02-02-2011 02:05 PM
loops within presentations supateach PowerPoint 1 11-23-2010 04:42 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:11 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft