View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default How to merge worksheets on a key - merge horizontally, that is

You can actually just insert a new column B in Sheet2--or copy sheet2 to sheet3
and do the work there.

In B1, put this formula:
=vlookup(a1,sheet1!a:b,2,false)

and drag down the column.



wrote:

Suppose Sheet1 looks like this:

KEY|VALUE
100 | Chevy
200 | Honda

Suppose Sheet2 looks like this:

KEY|VALUE
100 | Corvair
100 | Corvette
100 | Impala
200 | Accord
200 | Civic

How do I create Sheet3?

100|Chevy|Corvair
100|Chevy|Corvette
100|Chevy|Impala
200|Honda|Accord
200|Honda|Civic

Thanks.


--

Dave Peterson