Copy multiple dynamic ranges from different sheets into one master worksheet

Satos

New Member
Joined
Mar 21, 2014
Messages
13
Hi everybody,

I have a workbook to calculate costs and expenses of orders from different exports.
Every week I receive 2 exports and put them in different tabs. Both the exports are not in the same structure so I modify one using an extra tab. And at the end I have 2 tabs exactly in the same structure:
"Magento Export" and "Afterbuy modified"
In both the tabs I have my titles in 20 columns(A:T), and the values start at A3. I have defined both of the ranges in the tabs using dynamic range: "MExport" and "AModified".
What I would like to do is to copy these ranges to a third master sheet: "Sold Articles Database"

All three sheets are in the same structure and values start in A3 and goes for 20 columns. Since new rows will be added to both feed sheets I couldn't manage to do what I want to do using recording a macro.

Is there a way to do this without macro? Or if some one can explain me how to use the macro formula, I will be really happy.

Thanks in advance
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
I have used this macro and it seems to work:

Test1 Macro

Keyboard Shortcut: Ctrl+Shift+U

Sheets("Magento Export").Select
Range("OFFSET('Magento Export'!$A$3,0,0,COUNTA('Magento Export'!$A:$A),20").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Sold Articles Database").Select
Range("A3").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False

Sheets("Afterbuy modified").Select
Range("OFFSET('Afterbuy modified'!$A$3,0,0,COUNTA('Afterbuy modified'!$A:$A),20)").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("SoldArticles Database").Select
Selection.End(xlDown).Select
Selection.Offset(A, 0).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False

End Sub


If anybody sees a problem or has a suggestion, that would be lovely. If not let me know if what I did is correct :)
 
Upvote 0
I have added the following script to the macro:

Range("U3:BN3").AutoFill Destination:=Range("U3:BN" & Cells(Rows.Count, "A").End(xlUp).Row)

It slightly does what I want to do but from BA to BN I have a table that I use and the rows filled down are not added to the table with this formula. Does anybody know why this happens and has any suggestions?

thanks in advance
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,897
Messages
6,175,269
Members
452,628
Latest member
dd2

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