+ Reply to Thread
Results 1 to 5 of 5

Create Special format by copying data from Sheet1 to Sheet2 with conditions using VBA

  1. #1
    Registered User
    Join Date
    04-23-2013
    Location
    Singapore
    MS-Off Ver
    Excel 2010
    Posts
    56

    Create Special format by copying data from Sheet1 to Sheet2 with conditions using VBA

    Hi All,

    Nice to see this forum postings. I need to create a work book with VBA code which will create and append data from Sheet 1 to Sheet 2 in a specified format.

    Sheet 1 contains data rows from A2 onwards. For each unique value in column A, i need to copy A to K from Sheet 1 to Sheet 2 at specified destination as header and then append data of Sheet 1 from L to U into a different location in Sheet 2. Note that Header and Sub header in Sheet 2 are fixed between Header from A1 to N1 and sub header from E4 to N4. Same structure will get added when a new unique value in Column A is found in Sheet 1.

    Sample format is attached.

    I am able to reach to this stage of preparing Sheet 1 using EXCEL Pivot, Filteration, copy from other sheets using VBA code. But now stuck for this specialized formatting. Can any one suggest suitable VBA code?

    Thanks a lot for every one for understanding on above.

    Best Regards,

    Narasimharao
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    04-23-2013
    Location
    Singapore
    MS-Off Ver
    Excel 2010
    Posts
    56

    Re: Create Special format by copying data from Sheet1 to Sheet2 with conditions using VBA

    Hi All,

    Any one will be able to help me? To explain and simplify if there can be code to insert named range in between the rows for every change in Column A, it simplifies my requirement.

    Please suggest

    Best Regards,

    Nandula

  3. #3
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2010
    Posts
    6,657

    Re: Create Special format by copying data from Sheet1 to Sheet2 with conditions using VBA

    Pl see the attached file with macro.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    04-23-2013
    Location
    Singapore
    MS-Off Ver
    Excel 2010
    Posts
    56

    Re: Create Special format by copying data from Sheet1 to Sheet2 with conditions using VBA

    Hi Srinivasmurthy,

    Thanks for immediate support and your code worked absolutely as per my expectations.

    Thanks again

    Regards,

    Narasimharao

  5. #5
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2010
    Posts
    6,657

    Re: Create Special format by copying data from Sheet1 to Sheet2 with conditions using VBA

    Thanks for compliments.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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