Match two Excel Columns in Access

C

CR

Basically, I need to know how to match two Excel spreadsheets (w/ one
identical column in each) in Access.

For explanation purposes..

I have columns A B C D E in one Excel spreadsheet and columns A X Y in
another. A is the same in both columns. In access, is there a way that I
can bump the second spreadsheet against the first so that it matches the A's.
In other words, I am looking for an end result of A B C D E X Y.

If it helps, lets say column A is Customer ID numbers...so I want to pair up
data from each spreadsheet w/ one another.

Please let me know if you need more explanation. Thank you in advance for
your time!! :):)
 
J

Jamie Collins

CR said:
Basically, I need to know how to match two Excel spreadsheets (w/ one
identical column in each) in Access.

For explanation purposes..

I have columns A B C D E in one Excel spreadsheet and columns A X Y in
another. A is the same in both columns. In access, is there a way that I
can bump the second spreadsheet against the first so that it matches the A's.
In other words, I am looking for an end result of A B C D E X Y.

In your connections to Excel, specify HDR=NO. This allows you use the
columns' ordinal positions (F1, F2, F3,...) rather than named column
headers:

SELECT
T1.F1 AS A, T1.F2 AS B, T1.F3 AS C,
T1.F4 AS D, T1.F5 AS E, T2.F24 AS X,
T2.F25 AS Y
FROM
[Excel 8.0;HDR=NO;Database=C:\Book1.xls;].[Sheet1$] T1
INNER JOIN
[Excel 8.0;HDR=NO;Database=C:\Book2.xls;].[Sheet1$] T2
ON T1.F1 = T2.F1
;

--
 
Top