Results 1 to 3 of 3
  1. #1
    Star Lounger
    Join Date
    Mar 2003
    Location
    Toronto, Ontario, Canada
    Posts
    94
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Sorting Data (2000)

    I'm pulling data from two different databases - into one Excel spreadsheet. One database contains customer info. The other contains customer transactions. They are each identified by an account number. When I pull the data in from each - obviously, what I get is two records with the same account number. Is there a way of quickly consolidating both of these records into one row?
    ie:
    Account Name Address Sale
    1234 J Smith 123 Main St
    1234 -- -- 4

    I would like to sort/merge or do whatever to the data so that it appears as follows:
    Account Name Address Sale
    1234 J Smith 123 Main St 4

    Any advice would greatly help! Thanks

  2. #2
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Ankeny, Iowa, USA
    Posts
    298
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Sorting Data (2000)

    Could you pull the data from each database into separate sheets and use a vlookup to place the transactions in with the account information?

  3. #3
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Sorting Data (2000)

    If you need to do this one time and you never have more than one transaction record for an account number, then BAN's solution is probably the easiest thing to do. After doing that, you can eliminate the VLOOKUP formulas by using copy and paste special.

    If you have to do this often, then you will probably want to use a macro. If you want a macro, we will help if you will answer a couple of questions:

    1- What do you want to do if there is more than one transaction record for an account number?

    2- What are those two "--" in the transaction records? Does that indicate that there are two cells between the transaction number and the number you want merged with the line above? Is "1234 -- -- 4" a string all in one cell?

    It would also help if you could upload a sample workbook that could be use to test the macro.
    Legare Coleman

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •