Both of this source is from different workbook:


Workbook A (Sell)
Item Code Item name
001 2287
001 2296
002 411EA
001 412EA
002 2287

Workbook B (Buy)
Item Code Item name
001 2389
001 2411
002 413EA
001 412EA
002 2481

To become like this with different worksheets same workbook:

001 Item code(sheet1)
SELL TABLE
2287(sell table) (col for formulation)
2296(sell table) (col for formulation)

BUY TABLE
412EA(buy table) (col for formulation)


002 Item code(sheet2)
SELL TABLE
2287(sell table) (col for formulation)

BUY TABLE
413EA(buy table) (col for formulation)


If new item code exist it will go to another sheets. The buy table item code always have EA.
Please help me