Results 1 to 7 of 7

Paste Data Range given Target Row number

Threaded View

  1. #1
    Forum Contributor SCLai's Avatar
    Join Date
    08-18-2010
    Location
    Singapore
    MS-Off Ver
    Excel 2007
    Posts
    129

    Paste Data Range given Target Row number

    Hi everyone!
    Thanks for the help in advance...

    *Please refer to the uploaded sample-
    So I have this worksheet in which:
    > I have a set of Data Blocks (essentially a range of data) that I want to paste onto a target cell (Col Q to V).
    > The target cell's Column is fixed as "B", while Row is given in Col K.
    > For each of the give row number, there is a coresponding Block No. assigned. That Block (Data range) would have to be pasted into Cell B???, ??? as the given row number.

    My explaination seems messy even to myself but since my english is very powderful...

    Example (Row 4): Cell K4 = 4, Cell L4 = H1
    > so... Paste Range Q3:V4 (size of Block H1) onto B4 ('B' being fixed, '4' from Cell L4)
    > Repeat for next row (5 and onwards... to around 700?)
    *There are a good number of blank rows within Column K & L too (in the complete list), please simply skip that row and carry on.

    I have tried the following and of course it didn't work..
    Sub Format_Now()
    
    Set i = Intersect(Target_Assy, Range("$K$4:$K$20")) '4 to 20 (of 700 for testing)
    Set j = Intersect(Target_PasteRow, Range("$L$4:$L$20")) '4 to 20 (of 700 for testing)
      If Not i Is Nothing Then
        Select Case Target
          Case "":
          
          Case "H1":
          Range("Q3:V4").Select
          Selection.Copy
          Range("B" & j).Select
          ActiveSheet.Paste
          
          Case "B1":
          Range("Q6:V7").Select
          Selection.Copy
          Range("B" & j).Select
          ActiveSheet.Paste
          
        End Select
    
    End If
    
    End Sub

    Thanks for the help again!
    Attached Files Attached Files
    Do give a * (bottom left) if the post helped!

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