Combine two sheets based on unique number with header detail data

heryx

New Member
Joined
Oct 28, 2014
Messages
8
I am trying to combine data from two sheets (sheet 1 & 2) in a MS Excel 2010 workbook. Each sheet contains unique numbers in column B. However, the data contained in Sheet 2 may have the same unique number multiple times.

For example :
Sheet1
id inv no inv date customer
HEADER PSI-16-12-27-001 12/27/16 INFOCOM
HEADER PSI-16-12-27-002 12/27/16 DUTACOM
HEADER PSI-16-12-27-003 12/27/16 CELL NET

Sheet2
id inv no item no qty
DETAIL PSI-16-12-27-001 STBX1000301 10
DETAIL PSI-16-12-27-001 STDR1000300 5
DETAIL PSI-16-12-27-002 MX10001 1
DETAIL PSI-16-12-27-002 MP10000 2
DETAIL PSI-16-12-27-003 TDR5000 7

I want result like this in Sheet3
HEADER PSI-16-12-27-001 12/27/16 INFOCOM
DETAIL PSI-16-12-27-001 STBX1000301 10
DETAIL PSI-16-12-27-001 STDR1000300 5
HEADER PSI-16-12-27-002 12/27/16 DUTACOM
DETAIL PSI-16-12-27-002 MX10001 1
DETAIL PSI-16-12-27-002 MP10000 2
HEADER PSI-16-12-27-003 12/27/16 CELL NET
DETAIL PSI-16-12-27-003 TDR5000 7

I'm already try using vlookup and pivot table but still cannot find solution for this.
Any suggestions would be appreciated!

Thanks :)
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
Copy/Paste both data set, one below the other, to columns A:D of Sheet3,
Sort by column B

M.
 
Upvote 0

Forum statistics

Threads
1,223,230
Messages
6,170,883
Members
452,364
Latest member
springate

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top