Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]() "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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Seed numbers for random number generation, uniform distribution | Excel Discussion (Misc queries) | |||
abdualmohsn | Excel Discussion (Misc queries) | |||
Random Sampling | Excel Discussion (Misc queries) | |||
VBA "Rnd" Function: Truly Random? | Excel Discussion (Misc queries) | |||
random number results | Excel Worksheet Functions |