Copy entire column between workbooks based on cell value - Excel VBA

CakzPrimz

Board Regular
Joined
Oct 6, 2017
Messages
57
Dear Mr Excel,

I have two workbooks:
1. Shipping Plan.xlsb and sheets "Plan"
2. Final Packing List.xlsb and sheets "PackList"

In workbook Shipping Plan, sheets "Plan" I want to copy all columns in this sheet into workbooks "Final Packing List.xlsb" only if cell value in column AI is equal to cell G1 value.

Shipping Plan.xlsb, sheets "Plan", column AI is consist of shipment numbers
Shipping Plan.xlsb, sheets "Plan", cell G1 is consist of a shipment number. Let's say "DT-IN-156"

The macro should be copy all columns in sheets "Plan" into workbooks "Final Packing List.xlsb", sheet "PackList" only if cell value in column AI is equal to G1 value, if no records found it then a message box appear saying that "DT-IN-156" is not found.

Thank so much in advance.
prima
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
You want to copy only those rows in the "Plan" sheet where the value in column AI is equal to the value in cell G1. Is this correct?
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,286
Members
452,631
Latest member
a_potato

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