I collect orders through e-mailed Order Form Workbooks (file names will vary). When the order arrives, my macro unprotects the Order Form, unhides the Order Summary tab, copies the order data and activates the Order List tab in the Master Workbook, which is already open in the background and is where the macro is saved.
From here, I manually search for the Store ID # in Column A and paste the Order Data into that store's row. I'd like to automate this part of it by teaching the macro to reference the Store ID # in Cell A3 of the Order Form Workbook and then look for that ID # in the Master Workbook and paste the data.
This is my current code and attached workbooks for examples. Thank you!
How to I continue by finding the Store ID # in column A and then paste StoreOrder in the matching row?
From here, I manually search for the Store ID # in Column A and paste the Order Data into that store's row. I'd like to automate this part of it by teaching the macro to reference the Store ID # in Cell A3 of the Order Form Workbook and then look for that ID # in the Master Workbook and paste the data.
This is my current code and attached workbooks for examples. Thank you!
Code:
[COLOR=#222222][FONT=Verdana]Sub CopyPaste()[/FONT][/COLOR]
ActiveWorkbook.Unprotect "NAN" 'Order Workbook will arrive password protected
Sheets("OrderData").Visible = True 'Sheet with order data is hidden
Sheets("OrderData").Activate
'This copies Order data to make it ready for pasting into the Master workbook.
Dim storeOrder As Range
Set storeOrder = Range(Cells(3, 2), Cells(3, 52))
storeOrder.Copy
ActiveWorkbook.Activate 'To switch from Order Form Workbook to Master Workbook
'MasterOrders Sheet contains Store ID # list in range A3:A250.
Sheets("MasterOrders").Activate
How to I continue by finding the Store ID # in column A and then paste StoreOrder in the matching row?