+ Reply to Thread
Results 1 to 6 of 6

How to combine two excel files?

  1. #1
    Registered User
    Join Date
    10-06-2006
    Posts
    2

    Exclamation How to combine two excel files?

    Hello,
    I have got two excel files with one common filed name.The first file has account number,name,city and state.And the 2nd file has got account number and status fields.I want to combine both these excel files into one file by using the common filed account number.Can someone please help me with this.I'm not an expert in excdel so please answer in detail.

    many thanks

  2. #2
    Forum Expert
    Join Date
    09-09-2005
    Location
    England
    MS-Off Ver
    2007
    Posts
    1,500
    You need to provide a few more details. do the account numbers feature once in each sheet? or do they appear more than once in one of the sheets

    In terms of creating a solution, how big are the files? How many lines in each?


    Regards

    Dav

  3. #3
    Registered User
    Join Date
    10-06-2006
    Posts
    2

    Smile details

    Hi dav,

    Thanks for your reply.
    Well, each customer has got a unique account number and so there is no
    repetition of it in either of the files.let me explain with an example...
    file 1 contents given below

    acc.no. name city
    1011 ab cd
    2945 hgds kf
    6373 hdka kshd

    file 2 contents
    acc.no amount
    4373 9837
    4928 84399
    1011 38434

    what i want to do is to match these two files with the common field called account number and put all the details in one file which contains acc.no, customer name, city and amount.

    the file size is quite big...around 30k rows...

    many thanks

  4. #4
    Forum Expert
    Join Date
    09-09-2005
    Location
    England
    MS-Off Ver
    2007
    Posts
    1,500
    Well if both files are the same length you could just sort both of them by acc no then copy and paste the results of one file into the cells of the other file to the right. Or if sorting is not an option

    in the first workbook cell d2 put something like

    =VLOOKUP(A2,'[secondworkbook.xls]sheet1'!$A$2:$B$3000,2,FALSE)

    obviously you need to have the correct names of the sheets and the workbooks.

    The formula can then be copied down to d3000 and the data is combined

    If you select all the formulas and the copy and paste them on top of each other as values the join is made permanent

    Regards

    Dav

  5. #5
    Forum Contributor
    Join Date
    11-11-2005
    Posts
    267
    Another way:

    In file Insert 2 columns between Column A and Column B such that your data display becomes:

    ColumnA ColumnB ColumnC ColumnD
    -------- -------- -------- --------
    AcctNo <blank> <blank> amount
    4373 <blank> <blank> 9837
    4928 <blank> <blank> 84399
    1011 <blank> <blank> 38434

    Next, copy from the 2nd row down and append data onto contents of File1.
    Supply the heading AMOUNT in columnD of file1.

    Then, in a general module in File1, insert the following code and run same.

    Please Login or Register  to view this content.
    Last edited by Myles; 10-06-2006 at 01:30 PM.
    HTH
    Myles

    ...constantly looking for the smoother pebble while the whole ocean of truth lies before me.

  6. #6
    Registered User
    Join Date
    10-06-2006
    Posts
    3

    Arrow 3D operations

    Hello,
    Normally I use function SUM (F15* C$11, F15* C$11, F15* C$11)
    in order to conduct this operation in a sheet, nevertheless when I use this function to the same with cells in the same position, but in different sheets from a book , I obtain character limits error. (SUM('1'!F15*'1'!$C$11,'2'!F15*'2'!$C$11,'3'!F15*'3'!$C$11))
    Exists some function or VB method to do that simpler? Ej. 3D reference.

    Many thanks
    Last edited by Ruso2006; 10-09-2006 at 09:47 AM.

+ 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