ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Combining spread sheets with common fields (https://www.excelbanter.com/excel-discussion-misc-queries/202308-combining-spread-sheets-common-fields.html)

jjacksonn1966

Combining spread sheets with common fields
 
I have 2 different spread sheets with one common field. I want to combine the
two sheets together to have one sheet which has the data from only the common
field combined. Can someone help with this.

Don Guillett

Combining spread sheets with common fields
 
First, let's get the terminology right.
A file is called a workbook
Tabs within are called worksheets or sheets.
What is your layout and what is the common field.

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"jjacksonn1966" wrote in message
...
I have 2 different spread sheets with one common field. I want to combine
the
two sheets together to have one sheet which has the data from only the
common
field combined. Can someone help with this.



jjacksonn1966

Combining spread sheets with common fields
 
It is two different workbooks with one worksheet per workbook. The layout is
in columns and the common fields are column c on one sheet and column a on
the other.

"Don Guillett" wrote:

First, let's get the terminology right.
A file is called a workbook
Tabs within are called worksheets or sheets.
What is your layout and what is the common field.

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"jjacksonn1966" wrote in message
...
I have 2 different spread sheets with one common field. I want to combine
the
two sheets together to have one sheet which has the data from only the
common
field combined. Can someone help with this.




Dave Peterson

Combining spread sheets with common fields
 
Create a 3rd workbook.
Copy each of the worksheets from the two workbooks into this 3rd workbook (it'll
be easier and safer).
Close the 2 original workbooks.

Add a new worksheet to this workbook.
Copy a header row and all the data from either of the worksheets into column A.
Copy the data (no header row) from the other worksheet under the data in column
A (of the new sheet).

Now you have all the keys (some duplicated) in column A.

The use data|Filter|advanced filter to get unique values from that single
column.
http://contextures.com/xladvfilter01.html#FilterUR
and
http://www.contextures.com/xlVideos04.html#AdvFilt2003
(Both from Debra Dalgleish's site)

Then use a bunch of =vlookup()'s or =index(match())'s to return the data to be
compared (two columns--one for each worksheet). And a third column that would
indicate the differences.

Debra Dalgleish has lots of notes on =vlookup() and =index(match()) he
http://www.contextures.com/xlFunctions02.html (for =vlookup())
and
http://www.contextures.com/xlFunctions03.html (for =index(match()))
and
http://contextures.com/xlFunctions02.html#Trouble

Then you can retrieve the values that you want from each of the sheets--as long
as they fit on the worksheet.

jjacksonn1966 wrote:

It is two different workbooks with one worksheet per workbook. The layout is
in columns and the common fields are column c on one sheet and column a on
the other.

"Don Guillett" wrote:

First, let's get the terminology right.
A file is called a workbook
Tabs within are called worksheets or sheets.
What is your layout and what is the common field.

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"jjacksonn1966" wrote in message
...
I have 2 different spread sheets with one common field. I want to combine
the
two sheets together to have one sheet which has the data from only the
common
field combined. Can someone help with this.




--

Dave Peterson


All times are GMT +1. The time now is 09:19 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com