+ Reply to Thread
Results 1 to 5 of 5

Copying multiple variable length columns to one

  1. #1
    Registered User
    Join Date
    01-24-2013
    Location
    UK
    MS-Off Ver
    Excel 2007
    Posts
    5

    Copying multiple variable length columns to one

    Once again vba syntax has defeated me, so hopefully someone can help.

    I have data as in the dummy file attached.
    The first entry in each column is a label, eg: B2, then the values B3:B7 all belong to B2

    I want to reorganize the data into two columns that look like this:
    B2 B3
    B2 B4
    B2 B5
    B2 B6
    B2 B7
    C2 C3
    C2 C4
    etc. as shown in the attachment

    Thank you.
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor Sean Thomas's Avatar
    Join Date
    03-25-2012
    Location
    HerneBay, Kent, UK
    MS-Off Ver
    Excel 2007,2016
    Posts
    971

    Re: Copying multiple variable length columns to one

    Does your data always start in column B?
    Regards
    Sean

    Please add to my reputation if you think i helped
    (click on the star below the post)
    Mark threads as "Solved" if you have your answer
    (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code:
    [code] Your code here [code]
    Please supply a workbook containing example Data:
    It makes its easier to answer your problem & saves time!

  3. #3
    Registered User
    Join Date
    01-24-2013
    Location
    UK
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Copying multiple variable length columns to one

    It can do. (The real data will be 12 files with about 150 columns each with about 700 rows in each column)

    Thank you.

  4. #4
    Registered User
    Join Date
    01-24-2013
    Location
    UK
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Copying multiple variable length columns to one

    I've managed to find a solution, from this thread
    http://www.mrexcel.com/forum/excel-q...ng-ranges.html

    I've amended the code in that file slightly, as follows:
    Please Login or Register  to view this content.
    I also shifted my data to start at A1.

  5. #5
    Valued Forum Contributor Sean Thomas's Avatar
    Join Date
    03-25-2012
    Location
    HerneBay, Kent, UK
    MS-Off Ver
    Excel 2007,2016
    Posts
    971

    Re: Copying multiple variable length columns to one

    hmm, based on your data supplied. If you don't have the results underneath when you run it this will work

    Please Login or Register  to view this content.
    Its very difficult writing code unless you know the precise layout of your data and where you want the results to be.

+ 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. How to sum variable length columns spaced by empty spaces.
    By trig1dentity in forum Excel General
    Replies: 1
    Last Post: 08-26-2013, 11:52 PM
  2. Graphing Variable-length columns
    By Ben M in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 05-10-2006, 01:30 PM
  3. [SOLVED] Referencing a Value in variable length columns.
    By Kevin in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 01-28-2006, 07:01 AM
  4. Max/Min for variable length columns
    By Tim Rush in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-05-2006, 12:40 PM
  5. [SOLVED] RE: Copying RANGE of variable length
    By Jim Thomlinson in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-19-2005, 01:05 PM

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