VBA copy data from sheet1 to sheet2 using cross-reference table

Old-One

New Member
Joined
Jun 30, 2013
Messages
8
I need to transfer data (values) from Sheet1, listed as Stock #’s to Sheet2, listed as Inventory #’s, using the cross-reference table on Sheet3.


The number of columns of data in each row could range from around 10 columns to about 50 columns, so it would be nice if the VBA could copy from the first cell to the right of the Stock # to the last cell containing a value and paste that into Sheet2. There are also blank cells in each row.

I tried to use FIND, to make it process quickly since there are hundreds of rows of data in the actual spreadsheets but could not figure how to reference the tables on Sheet3.


It seems simple enough but I can’t seem to make it work. Maybe, I need to give up trying to use FIND and use something else, but I’m not sure what. Any assistance would be greatly appreciated.

Sheet1 – Original Data
Stock #1/28/20122/28/20123/28/20124/28/20125/28/20126/28/2012
3768LK1.891.731.981.572.03
KJ 3-4782.132.981.881.67
M-y780.981.061.223.761.87
tt-671.032.281.871.351.47
9-7-HE2.282.661.891.213.562.95
8-PM-92.803.782.222.73

<tbody>
</tbody>

Sheet2 – Need to transfer data from Sheet 1 to Sheet 2 using cross-reference table (Sheet3)
Inventory #1/28/20122/28/20123/28/20124/28/20125/28/20126/28/2012
378-065-6
431-67-1
578-004-32
696-0235-1
727-34-34
886-563-3

<tbody>
</tbody>

Sheet3 – cross-reference from Stock # to Inv #
Stock #Inventory #
3768LK431-67-1
KJ 3-478578-004-32
M-y78378-065-6
tt-67886-563-3
9-7-HE727-34-34
8-PM-9696-0235-1

<tbody>
</tbody>

Thank you for your assistance.
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college

Forum statistics

Threads
1,215,453
Messages
6,124,930
Members
449,195
Latest member
Stevenciu

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