Match (merge) components from 2 spreadsheets

  • Thread starter Thread starter mandg
  • Start date Start date
M

mandg

So I have this:

Sheet1
1 a roy
2 b orange
3 c yellow
4 y green
5 z blue

Sheet2
1 a january
2 b february
3 c march
4 f april
5 g may

...and I want to merge to create this:

Sheet3
1 a roy january
2 b orange february
3 c yellow march
4 f (blank) april
5 g (blank) may
6 y green (blank)
7 z blue (blank)


Is there any way to merge these two spreadsheets without going
cross-eyed?
 
I'd do something like this:

Create a new sheet (call it sheet3)
Put something in A1 (just as a header)
Copy the 2 lists into column A of this new sheet (one under the other)
(Don't include the headers when you copy--just the raw data)

Then select that range (A1:A###)
data|filter|advanced filter
Copy to another location
List range: (should be entered (a1:A###)
copy to: B1
Check Unique records only box

Now you have a list of unique codes in column B.
Delete column A (we're done with it).

In B1, put: On Sheet1
In C1, put: On Sheet2
(just some kind of headers)

In B2, put this formula:
=if(iserror(vlookup(a2,sheet1!a:b,2,false)),"",vlookup(a2,sheet1!a:b,2,false))

In C2, put this formula:
=if(iserror(vlookup(a2,sheet2!a:b,2,false)),"",vlookup(a2,sheet2!a:b,2,false))

Select B2:C2 and drag down as column A extends.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top