+ Reply to Thread
Results 1 to 7 of 7

VBA to copy the column and paste as new row with merged cells

  1. #1
    Registered User
    Join Date
    11-19-2021
    Location
    England
    MS-Off Ver
    16
    Posts
    4

    Question VBA to copy the column and paste as new row with merged cells

    Hello world


    I am trying to copy a column value and paste as a new row after each row as a merged cell. I have started my step towards this and managed to add a blank row after each row on specified sheet with range but need further on copying the column cell value and paste into each row.

    Any help would be appreciated.

    Thanks

    Screenshot 2021-11-19 125846.pngScreenshot 2021-11-19 125846.png

    Please Login or Register  to view this content.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    01-25-2011
    Location
    Belgium, Alveringem
    MS-Off Ver
    Excel 2003, 2007, 365
    Posts
    1,418

    Re: VBA to copy the column and paste as new row with merged cells

    always troubles with inserting, you have to start from the row above as reference
    Please Login or Register  to view this content.
    Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

  3. #3
    Registered User
    Join Date
    11-19-2021
    Location
    England
    MS-Off Ver
    16
    Posts
    4

    Re: VBA to copy the column and paste as new row with merged cells

    Update: Thank you so much.

    I am working on increasing the row height dynamically. I have an another sheet ("VariablSheet") with dictionary of what row height should be if the LEN characters of row exceeds certain value. How do I make this dynamic?
    Screenshot 2021-11-25 171059.png

    So far, I have the below:

    Please Login or Register  to view this content.
    Attached Images Attached Images
    Last edited by hai_its_; 11-26-2021 at 05:40 AM.

  4. #4
    Forum Expert
    Join Date
    01-25-2011
    Location
    Belgium, Alveringem
    MS-Off Ver
    Excel 2003, 2007, 365
    Posts
    1,418

    Re: VBA to copy the column and paste as new row with merged cells

    difficult, depends also on the used fond (monospaced) and size !
    Please Login or Register  to view this content.
    Last edited by bsalv; 11-26-2021 at 05:38 AM.

  5. #5
    Registered User
    Join Date
    11-19-2021
    Location
    England
    MS-Off Ver
    16
    Posts
    4

    Re: VBA to copy the column and paste as new row with merged cells

    yeah thank you. Because, its a merged cell it does not do autofit hence I am looking to increase the row height depending on the characters of the merged cell. Example, if the merged cell Len characters is greater than 0 then adjust row height to 15, then if len characters is greater than 195 then adjust row height to 30 and so on. I have attached the screenshot hope it makes sense.
    Last edited by hai_its_; 11-26-2021 at 06:33 AM.

  6. #6
    Forum Expert
    Join Date
    01-25-2011
    Location
    Belgium, Alveringem
    MS-Off Ver
    Excel 2003, 2007, 365
    Posts
    1,418

    Re: VBA to copy the column and paste as new row with merged cells

    30 characters per row ???
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    11-19-2021
    Location
    England
    MS-Off Ver
    16
    Posts
    4

    Re: VBA to copy the column and paste as new row with merged cells

    Thank you, I understood your concept and was able to incorporate with my sheet and it works !

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] copy data from merged cells and paste to merged cells in a different layout
    By elibdis in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 07-30-2021, 06:51 AM
  2. [SOLVED] How can I copy and paste merged cells?
    By FvdF in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 12-25-2020, 09:28 AM
  3. Merged cell error on copy/paste, but no merged cells
    By OmniBlue in forum Excel General
    Replies: 3
    Last Post: 07-15-2019, 02:15 PM
  4. Copy and paste all rows of merged cells
    By Madz0220 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-23-2017, 09:56 AM
  5. Copy cells and paste into a merged cell
    By dontke in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-20-2015, 11:06 AM
  6. [SOLVED] copy/paste to merged cells
    By tomanton in forum Excel General
    Replies: 10
    Last Post: 10-17-2013, 09:28 AM
  7. copy/paste formulas across merged cells?
    By juanzo007 in forum Excel General
    Replies: 2
    Last Post: 11-25-2010, 11:09 PM

Tags for this Thread

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