Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This question already has an answer here:

I have two workbooks which I need to merge. On workbook_1 I have column A with 5 letter codes and in column B I have numbers for what is on hand. On workbook_2 I have column A with the 5 letter codes, but some are different and some are the same as in column A from workbook_1. On column B this time I have numbers for what is authorized.
I need to combine column A from both workbook_1 and workbook_2 and keep the numbers from column B from both workbooks.

For example:


Column A:  Column B:    
ZWRAA      2
TRSAA      5
RSTAA      6
TRWA1      4
TRWA2      8
TRWA3      3


Column A:  Column B:
ZWRAA      5
TRSA1      6
TRSA2      9
TRWAA      7
TRWA2      2
YTSAA      1

This is what I need to see after I combine both workbooks:

ZWRAA   2        5
TRSAA   5        0
TRSA1   0        6
TRSA2   0        9
RSTAA   6        0
TRWAA   7        0
TRWA1   4        0
TRWA2   8        2
TRWA3   3        0
YTSAA   0        1
share|improve this question

marked as duplicate by allquixotic, slhck Feb 11 '13 at 21:38

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

This is called a join. You'll probably get more Google hits if you search for "spreadsheet join"

This has been answered on superuser before

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.