• Merge sections from one worksheet to another

    Home » Forums » AskWoody support » Productivity software by function » MS Excel and spreadsheet help » Merge sections from one worksheet to another

    Author
    Topic
    #471524

    Hi
    I have a workbook which has 2 worksheets and I was hoping there is some way that I can automatically (maybe using a macro) merge selected sections from the one sheet into the relevant section in the other worksheet.

    For example
    In the main worksheet I have 4 sections each with their own heading under which I have several rows of data. In the second worksheet I have the same sections with the same headings also with various rows of data.

    Once a month I want to copy all the rows of data in a particular section from Worksheet 2 and paste them in the same section on worksheet 1 and repeating this for each other section.

    Currently I do this manually by cutting and pasting but was hoping it might be able to be done possibly using a macro or some other way.

    Here’s hoping someone not only can make sense of this but also suggest a way of doing it

    Thanks

    Dax

    Viewing 2 reply threads
    Author
    Replies
    • #1242959

      Dax,

      Yes this is very doable via VBA {macro}. Could you answer a couple of questions?
      1. The data you are copying from sheet2 is it deleted from sheet2 after copying to sheet1?
      2. Are the sections in both sheets laid out vertically or horizontally, e.g. is section 2 under or to the right of section 1.

      It would be very helpful if you could upload a sample workbook with, if necessary, sterilized data.

      May the Forces of good computing be with you!

      RG

      PowerShell & VBA Rule!
      Computer Specs

    • #1242965

      Essentially, you are ‘appending’ the data from one worksheet to another.
      I would use the ‘sorting capability to align data into it’s corresponding section.

      Basically, what you do is use a ‘spare’ column on both sheets (I would call it ‘sortCol’)
      Then, by judicious numbering in this sort col, (e.g. 1.0, 1.01, 1.02, .., 4.0, 4.01, 4.02 etc), you could just copy and paste the whole block from sheet 2 to bottom of sheet 1, then use the sortCol to sort the rows into their correct section etc.
      Then delete the ‘duplicate’ section heading titles.

      zeddy

    • #1248154

      Hi

      Sorry for the delay in replying, I have been away with work and not able to access the Net.

      Below is further information as requested and to assist with this request I have uploaded a sample workbook to my Google docs site at:
      My linkhttps://docs.google.com/leaf?id=0B2R7hkuu2v2XZTQyMTIxNDYtZjVhZC00YzlmLTljMGUtMWZjN2MyZmRmZWVh&hl=en&authkey=CO7y9qIN

      The workbook contains 3 separate worksheets which are managed my separate individuals. On a monthly basis I need to combine the 3 worksheets into a new worksheet within the same workbook (while still keeping the original 3 worksheets). Currently I do this by cutting and pasting each section.

      Within each worksheet there are several headings/sections, i.e.:
      • Green
      • Skilling
      • Literacy
      • PiP
      • Places
      • Get Set

      I need all the data in each heading/section combined under the new worksheet under the relevant section.

      My preference would be for a macro that I could assign to a tool on the toolbar/ribbon that I could use to do this function.

      Is this possible or is there a different way I could set up the worksheets to achieve the same outcome.

      I look forward to your response

      Cheers

      Dax

    Viewing 2 reply threads
    Reply To: Merge sections from one worksheet to another

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: