Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Importing data into Excel

Hi,
I wanted to know if Microsoft Excel can import a file into excel and
then
automatically eliminate any duplicate records. For instance, File 1 and File
2 have multiple columns. Both share a common column header:

File 1
A B C D
Row 1 WRNO BN SALT MOLWt
Row 2 12345 A1 NONE 340.15
Row 3 23697 B1 NONE 540


File 2
Columns
A B C D E
Row 1 SMILES WRNO Para IC 50 IC 90
Row 2 C 12345 D6 286.36 552
Row 3 C 12345 W2 90 450
Row 4 C1C 23697 D6 NONE 540

I want to be able to automatically get rid of any duplicate cells and then
combine into File 1 all of the new rows to get the following data:

A B C D E F G
H I
Row 1 WR BN SALT MW SMILES D6 Ic 50 D6 IC 90 W2 Ic 50 W2
Ic 90
Row 2 12345 A1 NONE 340 C 286.36 552 90 450
Row 3 23697 B1 NONE 540 C1C NONE 540

How can I do this automatically? Is there a specific macro command/VB
script that I can use to obtain this output? I need for the script to
compare the data in File 1 against the data in file 2. If a column in FIle 2
is not in file 1, i want it to append that column and data to the file. If
there are duplicates within both files, I want the records to be deleted.
Thank you.

Ponder

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default Importing data into Excel


I'd use a query and let SQL do it for me.

You'll have to learn how to do queries and
a bit of SQL. But you wont need VBA.


--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


bigshotp wrote :

Hi,
I wanted to know if Microsoft Excel can import a file into excel
and then
automatically eliminate any duplicate records. For instance, File 1
and File 2 have multiple columns. Both share a common column header:

File 1
A B C D
Row 1 WRNO BN SALT MOLWt
Row 2 12345 A1 NONE 340.15
Row 3 23697 B1 NONE 540


File 2
Columns
A B C D E
Row 1 SMILES WRNO Para IC 50 IC 90
Row 2 C 12345 D6 286.36 552
Row 3 C 12345 W2 90 450
Row 4 C1C 23697 D6 NONE 540

I want to be able to automatically get rid of any duplicate cells and
then combine into File 1 all of the new rows to get the following
data:

A B C D E F
G H I
Row 1 WR BN SALT MW SMILES D6 Ic 50 D6 IC 90 W2 Ic
50 W2 Ic 90
Row 2 12345 A1 NONE 340 C 286.36 552
90 450 Row 3 23697 B1 NONE 540 C1C NONE 540


How can I do this automatically? Is there a specific macro
command/VB script that I can use to obtain this output? I need for
the script to compare the data in File 1 against the data in file 2.
If a column in FIle 2 is not in file 1, i want it to append that
column and data to the file. If there are duplicates within both
files, I want the records to be deleted. Thank you.

Ponder

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
importing data into excel paulp Excel Worksheet Functions 5 January 23rd 07 08:23 PM
Data types when importing Excel data to SQLServer [email protected] Excel Discussion (Misc queries) 1 September 27th 06 12:48 PM
Importing data into excel SGT Buckeye Excel Worksheet Functions 3 April 14th 06 01:52 AM
Importing data into excel Martina Excel Worksheet Functions 7 June 27th 05 08:11 AM
Importing data into Excel bigshotp Excel Discussion (Misc queries) 0 June 13th 05 08:31 PM


All times are GMT +1. The time now is 07:22 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"