+ Reply to Thread
Results 1 to 4 of 4

Merge and Order Data From Two Sheets

  1. #1
    Registered User
    Join Date
    09-17-2013
    Location
    Leeds
    MS-Off Ver
    Excel 2010
    Posts
    3

    Merge and Order Data From Two Sheets

    Hi,

    I am looking for a little help with merging and sorting some data.

    Currently I have two sheets linked to SQL databases. They are pulling through sales order information, one has the header info (variable number of lines due to version), one has the line info (variable number of lines per order); unfortunately they are in separate tables and so cannot be pulled through together.

    My ideal scenario is to do the following:

    On the actual data sheets, to the right of the data I will copy the relevant information I need from the mass data (using =). So on both sheets I will end up with the same number of columns, with the same column headings.

    Then what I would like is to take the data from both sets and combine them into one dataset on a third sheet, which also sorts them by the order number (each order has its own unique number). So I will then end up with the header of the order followed by the lines of the order.

    It would be even better if it could auto-group the lines with the single line from the header (the latest version (there is a version column with ascending number series)) every hour, so the third data sheet would need to reflect any changes.

    Is any of this possible, and if so I would really appreciate any help in doing this. I am using Excel 2010.

    Many thanks

    Matt
    Last edited by Disciple of Nagash; 09-17-2013 at 10:06 AM.

  2. #2
    Registered User
    Join Date
    09-17-2013
    Location
    Leeds
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Merge and Order Data From Two Sheets

    Just a bump - really appreciate if anyone can help at all.

    Cheers

    Matt

  3. #3
    Registered User
    Join Date
    09-17-2013
    Location
    Leeds
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Merge and Order Data From Two Sheets

    So I have managed to get some code which looks very promising:

    Please Login or Register  to view this content.
    However there are a couple of issues. The main one is that to the right of the connected date, I created a data set linked to the imported set. This set is much smaller and organises the data into the same columns across the sheets.

    However as this data is linked it does not display when carrying out the macro.

    The other changes I am looking for are:

    When the source data updates, it automatically updates on the combined sheet - it needs to do this without deleting the sheet as there will be other cells and calculations referencing the data.

    Set to auto-total (group) whenever there is new data on a specific column.

    Would really appreciate any help.

    Cheers

  4. #4
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Merge and Order Data From Two Sheets

    Please upload sample files so your request is clear.

    To Attach a File:

    1. Click on Go Advanced
    2. In the frame Attach Files you will see the button Manage Attachments
    3. Click the button.
    4. A new window will open titled Manage Attachments - Excel Forum.
    5. Click the Browse... button to locate your file for uploading.
    6. This will open a new window File Upload.
    7. Once you have located the file to upload click the Open button. This window will close.
    8. You are now back in the Manage Attachments - Excel Forum window.
    9. Click the Upload button and wait until the file has uploaded.
    10. Close the window and then click Submit.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ 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. [SOLVED] Merge data on different sheets
    By johnnylzep in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-04-2012, 07:33 AM
  2. Replies: 4
    Last Post: 10-06-2011, 12:57 PM
  3. Best way to merge data from 2 sheets
    By blades in forum Excel General
    Replies: 6
    Last Post: 09-26-2008, 12:32 PM
  4. Merge data from 2 sheets into 1
    By Badvgood in forum Excel General
    Replies: 1
    Last Post: 04-04-2007, 07:42 PM
  5. Data in different order in different sheets
    By grahambucknall in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-06-2006, 08:46 AM

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