+ Reply to Thread
Results 1 to 5 of 5

Excel 2007 : Copy and Pasting multiple times

  1. #1
    Registered User
    Join Date
    07-24-2008
    Location
    London
    Posts
    43

    Copy and Pasting multiple times

    Hi,

    I have one column with unique values:

    Column A
    Audi056
    BMW45
    Nissan34

    Alongside the above In Column B through to AO I have multiple data:

    Column A Column B Column C Column D....
    Audi056 Mirror Tyres
    BMW45 Wheel Mirrors
    Nissan34 Tyres Seat Gear


    I want to be able to have:
    Column A with Column B valies beside it (Column A is 10k rows long)
    Column A with Column C values beside (Now in Column B)

    i.e.
    Column A Column B
    Audi56 Mirror
    BMW45 Wheel
    Nissan34 Tyres
    Audi56 Tyres
    BMW45 Mirrors
    Nissan34 Seat
    Audi56
    BMW45
    Nissan34 Gear

    I could do this with copy and paste but it would take me hours. Wondering if there is an automated way.

  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: Copy and Pasting multiple times

    This will do it. It will only copy down the cells with data in them:
    Please Login or Register  to view this content.
    Last edited by JBeaucaire; 05-05-2010 at 02:41 PM. Reason: Added sorting code at the end
    _________________
    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
    Registered User
    Join Date
    07-24-2008
    Location
    London
    Posts
    43

    Re: Copy and Pasting multiple times

    This is the Output I get:

    Column A Column B
    Audi56 Mirror
    Audi56 Mirror
    Audi56 Tyres
    BMW45 Wheels
    BMW45 Wheels
    BMW45 Mirrors
    Nissan34 Tyres
    Nissan34 Tyres
    Nissan34 Seat
    Nissan34 Gears

    Seems like its duplicating the information in certain instances i.e.Mirrors, Wheels

    Can you assist?

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

    Re: Copy and Pasting multiple times

    Sure, you're testing on specific data, so let's see your workbook.

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

    Re: Copy and Pasting multiple times

    NVM, just change the 2 to a 3...we duplicated the first column of data when we didn't need to. I edited the original code above.

    A sample file and the code is posted here for testing. (it's in Part 1).
    Last edited by JBeaucaire; 05-05-2010 at 02:47 PM.

+ 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