Results 1 to 3 of 3

Copy cell value to another cell with variable number of iterations

Threaded View

WeirnetherlandsBart Copy cell value to another... 11-04-2014, 07:51 AM
sktneer Re: Copy cell value to... 11-04-2014, 08:29 AM
WeirnetherlandsBart Re: Copy cell value to... 11-04-2014, 11:02 AM
  1. #1
    Registered User
    Join Date
    08-03-2012
    Location
    Netherlands-Venlo
    MS-Off Ver
    Excel 2010
    Posts
    9

    Wink Copy cell value to another cell with variable number of iterations

    Hello,

    Attached file column A shows 24 values which are entered by the user. Cell E3 calculates a random value every time there is a change in the worksheet. This is an array function. What I want is that every random value is calculated as much as the number of iterations entered in Cell E1. Every random value must be placed from Cell E3 in column G, starting with Cell G2. Following random value calculated from Cell E3 must be placed in Cell G3 etc. This as much as the number of iterations enterd by the user. I tried a couple of times in Vba, but I need some advise! Here is a start from my code.

    Thanks in advance!

    Cheers, Bart

    Sub Randomnumber()
    Range("E5").Name = "Source"
    Range("G2").Select
    ActiveCell = Destination
    
    Iterations = 5000
    
    
    Counter = 1
    Do While Counter <= Iterations
            Range("Source").Select
            Selection.Copy
            Range("Destination").Select
            Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
            :=False, Transpose:=False
            Application.CutCopyMode = False
            ActiveCell.Offset(1, 0).Select
            Counter = Counter + 1
    Loop
    
    End Sub
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Find a variable text string in a cell and copy this to another cell
    By Timmy22 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-02-2014, 09:50 AM
  2. Replies: 10
    Last Post: 02-12-2014, 04:14 AM
  3. Replies: 2
    Last Post: 07-24-2012, 11:47 AM
  4. Replies: 2
    Last Post: 05-30-2012, 05:02 PM
  5. Cell Iterations???
    By jkresch in forum Excel General
    Replies: 5
    Last Post: 04-21-2009, 06:59 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1