+ Reply to Thread
Results 1 to 8 of 8

Copy and paste discrete data based on cell value using VBA

  1. #1
    Forum Contributor
    Join Date
    07-23-2012
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    211

    Copy and paste discrete data based on cell value using VBA

    Hi all

    Struggling to get a solution here. Would be grateful for a kick start.

    I receive periodic reports in a way shown in the first tab of the attached workbook. I need to build a Pivot Table of the information, so am trying to copy discrete data onto another sheet, shown in the secod tab.

    I only want to copy the cells highlighted in yellow in the first tab and paste them in the manner shown in the second tab.

    Could anybody help start me off?

    Kind regards
    Attached Files Attached Files

  2. #2
    Forum Expert OllieB's Avatar
    Join Date
    12-20-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 2007 (home) & 2010 (office)
    Posts
    1,542

    Re: Copy and paste discrete data based on cell value using VBA

    almost finished writing your solution. Need another 15 minutes or so
    If you like my contribution click the star icon!

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

    Re: Copy and paste discrete data based on cell value using VBA

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by AB33; 01-10-2013 at 06:36 AM.

  4. #4
    Forum Expert
    Join Date
    11-23-2005
    Location
    Rome
    MS-Off Ver
    Ms Office 2016
    Posts
    1,628

    Re: Copy and paste discrete data based on cell value using VBA

    This code maybe an idea:
    Please Login or Register  to view this content.
    Regards,
    Antonio

  5. #5
    Forum Expert OllieB's Avatar
    Join Date
    12-20-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 2007 (home) & 2010 (office)
    Posts
    1,542

    Re: Copy and paste discrete data based on cell value using VBA

    Have a look at the attached solution. Hope it works for you.

    PS. I have also taken the liberty of setting the correct cell formats in the target worksheet based on the cell formatting of the source worksheet.
    Attached Files Attached Files

  6. #6
    Forum Contributor
    Join Date
    07-23-2012
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    211

    Re: Copy and paste discrete data based on cell value using VBA

    WOW!!! Thanks so much guys!

    I was just looking for a kick start, but you have all provided me with the full solution!

    All three codes were different but all worked like a charm.

    OllieB, thanks for all the rem statements. It will help me understand your code.

    What a fantastic forum.

    Thanks once again all for taking the time to help me.


  7. #7
    Registered User
    Join Date
    08-14-2013
    Location
    Austria
    MS-Off Ver
    Excel 2011
    Posts
    2

    Re: Copy and paste discrete data based on cell value using VBA

    hi
    i have almost the same problem. see the example file. i have a list of merged tabs content. to process the data with a pivot table or other functions i need a structured list with specific cell values.
    can anyone help with a vba code to get this job done?
    thanks a lot for your support
    Attached Files Attached Files

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

    Re: Copy and paste discrete data based on cell value using VBA

    meincontroller,
    Welcome to the forum!
    Please start your own thread as per forum's rule.

+ 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