Results 1 to 4 of 4

For loop that pastes data using calculated row # and advances +1 column each time.

Threaded View

  1. #1
    Registered User
    Join Date
    07-21-2008
    Location
    Georgia
    MS-Off Ver
    2007
    Posts
    18

    For loop that pastes data using calculated row # and advances +1 column each time.

    Hello. I need a simple VBA code that will copy a range of data Sheet3.C4:C42 and paste, it into specific row numbers and columns. The row numbers are calculated and are in range Sheet1.H24:H64.

    Step by step, I would like the macro to:

    1. Copy "Data" Sheet3.C4:C42
    2. Look at the Row# in cell Sheet1.H24
    3. Paste "Data" into column "C", row "(H24)" (Sheet 2)
    4. Repeat "X" # of times. X is a number I will type into a cell (Say "E22") so if I want the loop to repeat 10 times, I will type "10" in Sheet1.E22.
    5. For each time it repeats, it should advance +1 column (so next it will paste the data to column "D")
    6. For each time it repeats, it should also use the next value in the range H24:H64 to get the correct row #. (so next it will use the number in H25 as it's row #)

    This seems simple, but I am really having a hard time digging through the forums and search engines to find a good enough explanation of loops and the rules associated.

    Any help is appreciated! Thank you! I attached a file to help.
    Attached Files Attached Files
    Last edited by rylo; 04-03-2011 at 05:43 PM.

Thread Information

Users Browsing this Thread

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

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