+ Reply to Thread
Results 1 to 7 of 7

Paste Data Range given Target Row number

  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..
    Please Login or Register  to view this content.

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

  2. #2
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Paste Data Range given Target Row number

    I can't understand, attach a sample with before and after situation and comments
    If solved remember to mark Thread as solved

  3. #3
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Paste Data Range given Target Row number

    Hi, SCLai,

    two questions regarding your explanation: you only marked the range Q9:V9 as B2, inside the range K4:L9 there are three lines for B2. So this block of line should only be copied once, and the other two rows will be skipped. Shall the data for F1 be in Row 11 anyhow or shall that move up to Row 9?

    Second: as we see in this example the spacing may vary. So please explain if the rows for your blocks are fixed (that means always have the same amount of rows) or differ? If they differ, do the blocks start in a determined number from the start of the first block (here frist blocks starts at 3, second at 18, third at 33...) Or do all blocks have a common bit to start with like "Control & Planning"?

    Ciao,
    Holger

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

    Re: Paste Data Range given Target Row number

    Hi everyone,

    Thanks for reading through the post!
    Hope the attached can answer the above questions, and thanks once again.

    SC
    Attached Files Attached Files

  5. #5
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Paste Data Range given Target Row number

    Hi, SCLai,

    maybe try this (please note that any borderlines will be erased as well in the destination area):

    Please Login or Register  to view this content.
    Please use this macro on a copy of your original workbook first. This code will always refer to the active sheet in the excel instance.

    Ciao,
    Holger

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

    Re: Paste Data Range given Target Row number

    Holger,

    Wow that worked nicely...
    Thanks for the help, you have just increased my department's efficiency by at least 5%!

    SC

  7. #7
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Paste Data Range given Target Row number

    Hi, SC,

    you´re welcome, I´m happy to help in your case.

    you have just increased my department's efficiency by at least 5%
    From my experience somebody will come up with new jobs that will make up for another 10% (just to double the numbr you indicated)

    Ciao,
    Holger

+ Reply to Thread

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