Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Lee Harris
 
Posts: n/a
Default Appending Random Results?


"DOR" wrote in message
...

I'm uploading a simple spreadsheet that does something like you want.

I created a Count named range in Sheet1 A1

The random results are in B1:G1.

A1:G1 is named Results

Log is a dynamic range on sheet two that eseentilally resolves to the
next open row in sheet 2 (or to be more precise the cell in column A of
the next open row in sheet 2)

The macro, initiated by the button copies values from Results to log
and then adds one to Count, which automatically causes recalc, creating
another set of random numbers. Youcan set Count to whatever you want
initially, the macro just adds one to it.

You can see where the code is stored by pressing alt-F11 and then
looking in module 1 of the spreadsheet.

For those who may not be able to download the spreadsheet the code
follows:

Sub LogResults()
Application.ScreenUpdating = False
Range("Results").Copy
Range("Log").PasteSpecial Paste:=xlPasteValues
Application.CutCopyMode = False
Range("Count") = Range("Count") + 1
Application.ScreenUpdating = True
End Sub

Hope it works for you.

Declan O'R


+-------------------------------------------------------------------+
|Filename: LogRandsData.zip |
|Download: http://www.excelforum.com/attachment.php?postid=4097 |
+-------------------------------------------------------------------+

--
DOR
------------------------------------------------------------------------
DOR's Profile:
http://www.excelforum.com/member.php...o&userid=29088
View this thread: http://www.excelforum.com/showthread...hreadid=490632


Thanks Declan, will have a play wit it now!
cheers


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Seed numbers for random number generation, uniform distribution darebo Excel Discussion (Misc queries) 3 April 21st 23 09:02 PM
abdualmohsn almedrahe abdualmohsn ahmad Excel Discussion (Misc queries) 1 November 19th 05 06:32 PM
Random Sampling Andrea Excel Discussion (Misc queries) 2 November 11th 05 09:52 AM
VBA "Rnd" Function: Truly Random? TheRobsterUK Excel Discussion (Misc queries) 2 September 27th 05 04:50 AM
random number results mcmil Excel Worksheet Functions 5 June 6th 05 03:34 AM


All times are GMT +1. The time now is 04:34 PM.

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

About Us

"It's about Microsoft Excel"