+ Reply to Thread
Results 1 to 5 of 5

Help w/ complex copy paste using VBA

  1. #1
    Registered User
    Join Date
    07-13-2010
    Location
    Minneapolis, MN
    MS-Off Ver
    Excel 2010
    Posts
    7

    Help w/ complex copy paste using VBA

    Hello Experts! I am completely stuck on trying to figure out how i can automate a copy/paste in VBA. I'm trying to take a list of cells in a single column, for each unique value, copy it 16 times into a new column. Then in an adjacent column count up each unique cell. Each value should count up to 16 times. The tricky part is that the unique values in the original column will change each day and I need the vba to be adaptable if the list is shorter or longer each day. I'm probably not explaining this well enough, so I attached a example spreadsheet to this post. I'm beginning to wonder if this is possible to do using vba.

    For each unique value in Column A, I would like to copy each one 16 times each. I would then like to add the a position or count for each one, each "Site" will count up to 16. The number of values in column A will constantly change so I need the vba to be adaptable to shorter or longer lists of Sites.

    Column A: This is the original data I have to work with.

    Columns E:F, This is what I need the data to look like.
    Attached Files Attached Files
    Last edited by rucypher; 11-03-2014 at 12:43 PM.

  2. #2
    Forum Expert MickG's Avatar
    Join Date
    11-23-2007
    Location
    Banbury,Oxfordshire
    Posts
    2,650

    Re: Help w/ complex copy paste using VBA

    Try this:-
    Please Login or Register  to view this content.
    Regards Mick

  3. #3
    Forum Guru
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,445

    Re: Help w/ complex copy paste using VBA

    Try the attached.
    Attached Files Attached Files

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    35,967

    Re: Help w/ complex copy paste using VBA

    Late entry:

    Please Login or Register  to view this content.

    Regards, TMS
    Trevor Shuttleworth - Excel Aid

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  5. #5
    Registered User
    Join Date
    07-13-2010
    Location
    Minneapolis, MN
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Help w/ complex copy paste using VBA

    This worked perfectly, Thank You so much!!!

+ 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. Complex Copy Paste Delete With Various Rules
    By timbo1957 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-11-2014, 04:15 AM
  2. Replies: 2
    Last Post: 07-02-2013, 05:47 AM
  3. Complex Copy and Paste Macro
    By Jon Snow in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-17-2013, 05:33 AM
  4. Complex Copy and Paste Function
    By DewayAuggy in forum Excel General
    Replies: 2
    Last Post: 02-27-2012, 06:36 PM
  5. Complex Vlookup and paste
    By playtowinpb@msn.com in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-29-2011, 04:13 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