Billman101
New Member
- Joined
- Feb 14, 2019
- Messages
- 9
Hello,
I’m wanting to copy and insert data from sheet 2 to sheet 1 based on one of seven dates (a week’s worth) that’s on sheet one in column B (seven cells spaced two rows apart starting at Row 3).
Sheet 2 has columns A thru K with column H having the DATES that are on sheet 1.
Sheet 1 has columns A thru K as well and is where I’d like to insert/paste data based on the Dates starting at row 4.
The base (clean) sheet 1 will have the dates in B3 (Sun), B6 (Mon), B9 (Tue), B12 (Wed), B15 (Th), B18 (Fri) and B21 (Sat).
I’d like the macro to look up the DATES in column H on Sheet 2 and insert the data in Sheet 1 starting at cell A4 (one row below and one column to the left of the first date). Subsequent DATES would then insert in the same manner as the first until all seven days are complete.
Each subsequent date’s specific data would need to adjust and insert rows accordingly for each of the seven dates.
There may be times where a date has no values in sheet two (that date may not even exist in the data) in which this case nothing would be copied/pasted and the sheet would stay in it's base (clean) state, just an empty section for that day.
I hope I've copied the sheets correctly below for reference.
Thanks for any insight!!
I’m wanting to copy and insert data from sheet 2 to sheet 1 based on one of seven dates (a week’s worth) that’s on sheet one in column B (seven cells spaced two rows apart starting at Row 3).
Sheet 2 has columns A thru K with column H having the DATES that are on sheet 1.
Sheet 1 has columns A thru K as well and is where I’d like to insert/paste data based on the Dates starting at row 4.
The base (clean) sheet 1 will have the dates in B3 (Sun), B6 (Mon), B9 (Tue), B12 (Wed), B15 (Th), B18 (Fri) and B21 (Sat).
I’d like the macro to look up the DATES in column H on Sheet 2 and insert the data in Sheet 1 starting at cell A4 (one row below and one column to the left of the first date). Subsequent DATES would then insert in the same manner as the first until all seven days are complete.
Each subsequent date’s specific data would need to adjust and insert rows accordingly for each of the seven dates.
There may be times where a date has no values in sheet two (that date may not even exist in the data) in which this case nothing would be copied/pasted and the sheet would stay in it's base (clean) state, just an empty section for that day.
I hope I've copied the sheets correctly below for reference.
Thanks for any insight!!
Book1 | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | K | |||
1 | Header 1 | Header 2 | Header 3 | Header 4 | Header 5 | Header 6 | Header 7 | Header 8 | Header 9 | Header 10 | Header 11 | ||
2 | |||||||||||||
3 | Sunday | 4/7/2019 | |||||||||||
4 | |||||||||||||
5 | |||||||||||||
6 | Monday | 4/8/2019 | |||||||||||
7 | |||||||||||||
8 | |||||||||||||
9 | Tuesday | 4/9/2019 | |||||||||||
10 | |||||||||||||
11 | |||||||||||||
12 | Wednesday | 4/10/2019 | |||||||||||
13 | |||||||||||||
14 | |||||||||||||
15 | Thursday | 4/11/2019 | |||||||||||
16 | |||||||||||||
17 | |||||||||||||
18 | Friday | 4/12/2019 | |||||||||||
19 | |||||||||||||
20 | |||||||||||||
21 | Saturday | 4/13/2019 | |||||||||||
22 | |||||||||||||
23 | |||||||||||||
Sheet1 |
Book1 | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | K | |||
1 | Header 1 | Header 2 | Header 3 | Header 4 | Header 5 | Header 6 | Header 7 | DATE | Header 9 | Header 10 | Header 11 | ||
2 | |||||||||||||
3 | |||||||||||||
4 | |||||||||||||
5 | |||||||||||||
6 | |||||||||||||
7 | |||||||||||||
8 | |||||||||||||
9 | |||||||||||||
10 | |||||||||||||
Sheet2 |