Copy/Paste Range of Data from Multiple Workbooks/Worksheets to Master Workbook/Worksheets with Conditions

NumberCruncher311

New Member
Joined
Feb 5, 2013
Messages
26
Greetings,
I've been searching and searching for a solution. I've been able some threads that address parts of what I need, but I'm such a VBA novice, I don't know how to put them all together. I'm hoping someone can help me create the code to get this done ...

Excel 2003
Windows v8

--WHAT I HAVE--

I have three workbooks: Workbook_A, Workbook_B and Workbook_C. Within these workbooks, each has two worksheets: Sheet_1 and Sheet_2.

I also have a master workbook: Workbook_Master. It also has two worksheets identically named as the others: Sheet_1 and Sheet_2.

All four workbooks are saved within the same folder on my computer: U:\Marketing\Pipeline

--WHAT I NEED--

I need a macro button (or buttons), that when selected will:

1) Copy the data from Workbook_A/Sheet_1, Workbook_B/Sheet_1 and Workbook_C/Sheet_1 and paste onto Workbook_Master/Sheet_1 ... with the following conditions:
  • Range for Sheet_1 on Workbook_A, B & C is A2:Z1000
    • I need the macro to "look" at the whole range on each sheet but only copy/paste the rows where the data in A2:A1000 = open, settled or closed
  • Pasting onto Sheet_1 on Workbook Master can begin at A2 (as to not paste over my header row)
    • Data from Sheet_1 of Workbook_A, B & C needs to be pasted to Workbook_Master/Sheet_1 on the next available row, so they aren't pasting on top of each other
    • Each time macro is run, pasting can begin again at A2 again and overwrite the data in Workbook_Master/Sheet_1 (or first clear contents, then paste).

2) Copy the data from Workbook_A/Sheet_2, Workbook_B/Sheet_2 and Workbook_C/Sheet_2 and paste onto Workbook_Master/Sheet_2 with the following conditions:
  • Exact same conditions as above

**If possible I'd like to be able to run the macro on on Workbook_Master without having to open the other three workbooks.

I think that's all the details. If I forgot anything or need any additional information please let me know. Thank you in advance for your help!!
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.

Forum statistics

Threads
1,215,529
Messages
6,125,344
Members
449,219
Latest member
Smiqer

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