+ Reply to Thread
Results 1 to 3 of 3

VBA. Move data from certain columns to another sheet, stacked up

  1. #1
    Forum Contributor
    Join Date
    01-29-2011
    Location
    Bristol, England
    MS-Off Ver
    Excel 2003
    Posts
    471

    VBA. Move data from certain columns to another sheet, stacked up

    Hi

    I'm after a VBA code that would scan the following ranges below on the sheet called "Data":

    Please Login or Register  to view this content.
    It would look at these columns and copy over information from row 2 downwards (in order to exclude the headers). Now the data in these columns will be dynamic in terms of number of rows of information. It can be zero to couple rows. The code should use the the first column of the range to determine the row count.
    e.g. with "R:T", it would be column "R" to determine the row count.

    I would like the code to take the data within these columns and copy them over to a sheet called "output" and neatly stack them up in column "A:C".

    I have done an example workbook together with sheet called "Example Output" so it is easier to understand what the desired outcome is. I have highlighted these columns in yellow and the data that should be copied over as in green.

    I would appreciate if someone could offer me the most efficient code that you can think that would achieve the desired outcome.
    Any help is genuinely appreciated.
    Cheers
    Rain

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: VBA. Move data from certain columns to another sheet, stacked up

    Try this out:

    Please Login or Register  to view this content.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Contributor
    Join Date
    01-29-2011
    Location
    Bristol, England
    MS-Off Ver
    Excel 2003
    Posts
    471

    Re: VBA. Move data from certain columns to another sheet, stacked up

    Hi JBeaucaire
    Spot on! Very clever stuff.
    Thank you.

+ 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