VBA copy data from workbook to another based on criteria and copy method

VfTom

New Member
Joined
Mar 3, 2023
Messages
10
Office Version
  1. 365
Platform
  1. Windows
Dear All,

I have 2 workbooks, one source workbook with data spread on different sheets and one other workbook where the data needs to be copied to with one working sheet.
The data from the different sheets from the source workbook need to copied below each other on to the single sheet on the other workbook.

The copying of the data is based on a criteria which is the name of the workbook and based on this criteria a copy method of choice should be utilized.
(The copy method is a specific order of columns to be copied from the source to the working sheet.) There are 3 different copy methods based on the name of the sheets of the source workbook.

For example I have a source workbook with sheets which are types of fruits, vegetables and legumes (please see snip here below).
The data from these sheets needs to be copied to the working sheet based on their category (fruits, vegetables or legumes) and each category has its own copying method.

Does anyone have a good approach for this?

Source Workbook:
1697533666226.png

Working Sheet

1697533713712.png


Thank you in advance.
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.

Forum statistics

Threads
1,223,275
Messages
6,171,121
Members
452,381
Latest member
Nova88

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