I am looking for a way to simplify something I do manually. I copy a range (which varies in length) and insert it in an existing workbook starting at A2, moving the existing data down. Here are the step I do manually
1. Highlight the range from E5 to G(to the end of the data)
2. Open the target workbook (the workbook varies)
3. Insert the copied range values and move the existing data (which is always starting at A2 and is three columns wide). The extra step is the data I am copying has to be pasted as values and I want to insert it and move existing data down.
I want to copy the data under the headers. In this case, is E5:G23 in the worksheet (called "Portfolios" or Sheet14) but the range varies in length but will always be three columns wide
I would like the VBA to prompt the user to pick a destination workbook which would open up a workbook like below (but it could have hundreds on line of data (this is a small sample of the top portion of the data). The data from the source workbook should be pasted (as values) under the headers while moving the data down.
this is the result after pasting
Is this possible to do this? Any help is greatly appreciated.
Cheers,
GG
1. Highlight the range from E5 to G(to the end of the data)
2. Open the target workbook (the workbook varies)
3. Insert the copied range values and move the existing data (which is always starting at A2 and is three columns wide). The extra step is the data I am copying has to be pasted as values and I want to insert it and move existing data down.
I want to copy the data under the headers. In this case, is E5:G23 in the worksheet (called "Portfolios" or Sheet14) but the range varies in length but will always be three columns wide
Date | Symbol | Target Weight |
01/15/2022 | AAPL | 0.0344 |
01/15/2022 | ACN | 0.0052 |
01/15/2022 | ADP | 0.0060 |
01/15/2022 | AMP | 0.0082 |
01/15/2022 | BX | 0.0068 |
01/15/2022 | C | 0.0042 |
01/15/2022 | CC | 0.0050 |
01/15/2022 | CMG | 0.0060 |
01/15/2022 | COST | 0.0046 |
01/15/2022 | CTLT | 0.0030 |
01/15/2022 | DHR | 0.0050 |
01/15/2022 | DUK | 0.0032 |
01/15/2022 | EA | 0.0024 |
01/15/2022 | EL | 0.0052 |
01/15/2022 | FB | 0.0068 |
01/15/2022 | HON | 0.0044 |
01/15/2022 | J | 0.0048 |
01/15/2022 | KO | 0.0038 |
01/15/2022 | LLY | 0.0066 |
I would like the VBA to prompt the user to pick a destination workbook which would open up a workbook like below (but it could have hundreds on line of data (this is a small sample of the top portion of the data). The data from the source workbook should be pasted (as values) under the headers while moving the data down.
99 Growth Y Charts DYNAMIC 01-15-22.xlsx | |||||
---|---|---|---|---|---|
A | B | C | |||
16 | 10/16/2020 | aapl | 0.0082 | ||
17 | 10/16/2020 | acn | 0.0044 | ||
18 | 10/16/2020 | adp | 0.0058 | ||
19 | 10/16/2020 | amp | 0.0074 | ||
20 | 10/16/2020 | amt | 0.0038 | ||
21 | 10/16/2020 | bx | 0.005 | ||
22 | 10/16/2020 | c | 0.0058 | ||
23 | 10/16/2020 | cmg | 0.0066 | ||
24 | 10/16/2020 | cost | 0.0036 | ||
25 | 10/16/2020 | ctlt | 0.0034 | ||
26 | 10/16/2020 | dis | 0.007 | ||
27 | 10/16/2020 | el | 0.0054 | ||
Sheet1 |
this is the result after pasting
99 Growth Y Charts DYNAMIC 01-15-22.xlsx | |||||
---|---|---|---|---|---|
A | B | C | |||
2 | 01/15/2022 | AAPL | 0.0344 | ||
3 | 01/15/2022 | ACN | 0.0052 | ||
4 | 01/15/2022 | ADP | 0.006 | ||
5 | 01/15/2022 | AMP | 0.0082 | ||
6 | 01/15/2022 | BX | 0.0068 | ||
7 | 01/15/2022 | C | 0.0042 | ||
8 | 01/15/2022 | CC | 0.005 | ||
9 | 01/15/2022 | CMG | 0.006 | ||
10 | 01/15/2022 | COST | 0.0046 | ||
11 | 01/15/2022 | CTLT | 0.003 | ||
12 | 01/15/2022 | DHR | 0.005 | ||
13 | 01/15/2022 | DUK | 0.0032 | ||
14 | 01/15/2022 | EA | 0.0024 | ||
15 | 01/15/2022 | EL | 0.0052 | ||
16 | 01/15/2022 | FB | 0.0068 | ||
17 | 01/15/2022 | HON | 0.0044 | ||
18 | 01/15/2022 | J | 0.0048 | ||
19 | 01/15/2022 | KO | 0.0038 | ||
20 | 01/15/2022 | LLY | 0.0066 | ||
21 | 10/16/2020 | aapl | 0.0082 | ||
22 | 10/16/2020 | acn | 0.0044 | ||
23 | 10/16/2020 | adp | 0.0058 | ||
24 | 10/16/2020 | amp | 0.0074 | ||
25 | 10/16/2020 | amt | 0.0038 | ||
26 | 10/16/2020 | bx | 0.0050 | ||
27 | 10/16/2020 | c | 0.0058 | ||
28 | 10/16/2020 | cmg | 0.0066 | ||
29 | 10/16/2020 | cost | 0.0036 | ||
30 | 10/16/2020 | ctlt | 0.0034 | ||
31 | 10/16/2020 | dis | 0.0070 | ||
32 | 10/16/2020 | el | 0.0054 | ||
Sheet1 |
Is this possible to do this? Any help is greatly appreciated.
Cheers,
GG
Last edited: