+ Reply to Thread
Results 1 to 4 of 4

copy range into new sheet (concatenated columns, every second column)

  1. #1
    Registered User
    Join Date
    03-30-2023
    Location
    Austria
    MS-Off Ver
    365
    Posts
    11

    Question copy range into new sheet (concatenated columns, every second column)

    Dear VBA experts,

    I am planning to create Avery labels directly in Excel (by formatting the page and cell sizes) and in desperate need of solution to transfer the data into the label sheet appropriately.
    In the attached example, there is input label data on the Sheet1 = 5 columns with data per label. Each column = one line on the label. Every row = new label. In this example there are 2 labels repeated 8 and 13 times, respectively.
    I would like to concatenate all 5 columns per row and paste them into the new sheet starting in A1, every 2nd column until column 7, then start new row and repeat until all labels are on the sheet.
    An example how the labels should look like in on the Sheet2.
    Page Formatting part I can write on my own

    Thank you in advance for all the suggestions!
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Cool Try this !


    According to your attachment a VBA demonstration for starters :

    PHP Code: 
    Sub Demo1()
        
    Dim C%, R&, Rw As Range
            C 
    1
            R 
    1
            Sheet2
    .UsedRange.ClearContents
        
    For Each Rw In Sheet1.[D2].CurrentRegion.Rows
            Sheet2
    .Cells(RC) = Join(Application.Index(Rw.Value10), vbLf)
            If 
    7 Then C 1Else 2
        Next
    End Sub 
    ► Do you like it ? ► So thanks to click on bottom left star icon « Add Reputation » !

  3. #3
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,430

    Re: copy range into new sheet (concatenated columns, every second column)

    With an formula, please try
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    03-30-2023
    Location
    Austria
    MS-Off Ver
    365
    Posts
    11

    Re: copy range into new sheet (concatenated columns, every second column)

    Thank you, Mark and thank you, Hans! - exactly what I need (although only as VBA option at the moment).

+ 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] Summing a Range Where Column Header Appears in a Concatenated Cell
    By AliGW in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-01-2021, 04:55 PM
  2. Replies: 6
    Last Post: 04-20-2017, 10:27 AM
  3. Copy/Paste cell range from sheet 1 to sheet 2 in numbers match in reference columns.
    By trickedout in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-23-2016, 07:44 PM
  4. Count unique text from multiple columns concatenated w/ one column
    By lopez235 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-01-2015, 08:54 PM
  5. how to copy columns of another sheet with the column data of current sheet
    By amethystfeb in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-28-2014, 11:28 PM
  6. vba to Match concatenated values in concatenated columns
    By bjurick in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-28-2012, 03:45 PM
  7. Finding Unique Count for a Concatenated Range of Columns.
    By e4excel in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-12-2012, 06:30 AM

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