LOOK UP and COPY to Diff Sheet Within Same Workbook (vba)

ChrisOK

Well-known Member
Joined
Mar 26, 2003
Messages
601
Trying to put together vba to compare the "parts" sheet to the "orders" sheet (both in same workbook).
Specifically compare COL B of "parts" sheet starting at ROW 8 to COL P of the "orders" sheet starting with ROW 5.

If match IS found, do the following copies from "parts" sheet to "orders" sheet:
Copy COL D cell data on "parts" to COL Q of "orders"
Copy COL A cell data on "parts to COL R of "orders"
Copy COL G cell data on "parts to COL E of "orders"

If NO MATCH is found, do the following copies to the NEXT AVAILABLE OPEN ROW on the "orders" sheet:
(this will essentially add this line item to the base of the parts list that was found missing)
Copy COL B cell data on "parts to COL P of "orders"
Copy COL D cell data on "parts to COL Q of "orders"
Copy COL A cell data on "parts to COL R of "orders"
Copy COL G cell data on "parts to COL E of "orders"
Last, Turn all data to red bold font on all these items/rows that have been added as new rows of data (at the base of "parts")...
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.

Forum statistics

Threads
1,215,063
Messages
6,122,934
Members
449,094
Latest member
teemeren

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