Challenge two worksheets query and merge !!

jvmatias

New Member
Joined
Oct 31, 2012
Messages
3
Dear Excel Gurus

I have tried looking up answers and never realized how difficult it would be to bring data from two worksheets into one- seemed simple when I took on the task.

So here goes.....I am working with two worksheets that are different sizes (meaning unknow number of entries as it depends on month some more than others), with different headers that need to be merged into a worksheet with all the columns copied side by side on the same row.

WORKSHEET 1- Producers

Prod_recProd_nameProd_attnProd_strProd_cityProd_stProd_zipProd_phbProd_faxProd_email
001Good Inc.Suite 2004 Good StTodayCA32457800-123-4567352-222-1234good@good.com
GV3Happy WayBuilding U20 Years Ago RdTimeFL33184800-444-4567203-456-7890Happy@happy.com
LL2Time Today45 Sun TerraceSunnydaleVA32784888-145-5687321-123-4568Time@time.com
354Excel Inc.34 Some StreetCowTX12345888-894-7894200-523-1654Excel@excel.com

<TBODY>
</TBODY>


Worksheet 2- Broker
Br_recBr-nameBr_attnBr_strBr_cityBr_stBr_zipcodeBr_phbBr_emailBr_hdgBr_noteBr_ccode
ABCD354Excel Inc.Suite A34 Some StreetCowTX12345888-894-7894Excel@excel.com1/11/11Leo x12IN
LOSTLL2Time Today65 Fun TerraceSunnyWY58457887-452-7894Time1@time.comNOONEAL
BRAV001Good Inc.4 Good StTodayCA32457800-123-4567good@good.com05/11/11In GABB
GOEDGV3Happy WayBuilding U40 Years Ago RdSunnydaleVA32784800-444-4567Happy@happy.comINACTIVEwww.a.comHB

<TBODY>
</TBODY>

So NEW WORKSHEET- RESULTS would look like this

001Good Inc.Suite 2004 Good StTodayCA32457800-123-4567352-222-1234good@good.comBRAV001Good Inc.4 Good StTodayCA32457800-123-4567good@good.com05/11/11In GABB

<TBODY>
</TBODY>

<TBODY>
</TBODY>


SO what I tried was to get the 001 from one worksheet to find it in the other worksheet and pull data for both in the third workbook side by side. SO basically use producer record number and pull both records into one row.

NO LUCk :( So any ideas????

Have never programmed macros, tried using basic functions.
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
Welcome to the Board!

If the Prod_rec number exists in the other worksheet you should be able to use VLOOKUP. Note that's if the unique ID's are in the leftmost column, otherwise you can use INDEX/MATCH.

If you have a lot of records (and are using Excel 2010+) then you can use PowerPivot to link the tables and create your desired output.

But if you don't have a unique ID between the two recordsets then you'll have a tough time trying to pull them together.

HTH,
 
Upvote 0
Thanks for your welcome :)

They are two different headers Br_rec vs Prod_rec that have can be cross referenced by the three digits, will look into how to use PowerPivot and INDEX/MATCH. Wish me luck
 
Upvote 0
If you add a column to the second sheet (column B) you can use this:

=RIGHT(A2,3) to pull the last three digits, and then use VLOOKUP on that column.
 
Upvote 0
I did:

=VLOOKUP(Producer!A2,--RIGHT(Broker!A3:A59,3),2,FALSE) this gave me #N/A

==VLOOKUP(Producer!A2,Broker!A3:59,2,FALSE) this gave me #REF
 
Upvote 0

Similar threads

Forum statistics

Threads
1,214,821
Messages
6,121,762
Members
449,048
Latest member
excelknuckles

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