Hello, I am still fairly new to VBA and don't have any experience writing code that takes three different sheets into account. So I'm not sure where to begin.
If a cell in col A, sheet "CUST_COLOR" matches a cell in col A, sheet "BLANKET_DATA", then copy the entire row from "BLANKET_DATA" and paste to sheet "IMPORT" starting at A2.
Looping through all cells with text in col A, "CUST_COLOR".
Also, each match between CUST_COLOR and BLANKET_DATA would need to be pasted as many times as there are cells with text in col B in CUST_COLOR. With col B from CUST_COLOR copied to col D&C on IMPORT.
I appreciate any help, thank you.
BLANKET_DATA
CUST_COLOR
Example of end result IMPORT
If a cell in col A, sheet "CUST_COLOR" matches a cell in col A, sheet "BLANKET_DATA", then copy the entire row from "BLANKET_DATA" and paste to sheet "IMPORT" starting at A2.
Looping through all cells with text in col A, "CUST_COLOR".
Also, each match between CUST_COLOR and BLANKET_DATA would need to be pasted as many times as there are cells with text in col B in CUST_COLOR. With col B from CUST_COLOR copied to col D&C on IMPORT.
I appreciate any help, thank you.
BLANKET_DATA
IMPORT FILE EXAMPLE.xlsm | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | K | L | M | |||
1 | COLOR | TYPE | CUST ACCT | CUST CODE | COLOR CODE | Username 1 | Credential 1 | Credential 2 | Credential 3 | ACCT | ACCOUNT FLAG | Payment | ENABLE OVERRIDE | ||
2 | Black | STANDARD | BLACK | SPECIAL | 12345 | 888888 | USD | ||||||||
3 | Blue | STANDARD | BLUE | SPECIAL | 67891 | 22222 | 777777 | No | USD | Yes | |||||
4 | Brown | STANDARD | BROWN | 444444 | USD | No | |||||||||
5 | Gray | STANDARD | GRAY | 12345 | 999999 | USD | No | ||||||||
6 | Green | STANDARD | GREEN | SPECIAL | 12345 | 666666 | USD | No | |||||||
7 | Orange | STANDARD | ORANGE | SPECIAL | 67891 | 22 | 111111 | USD | No | ||||||
8 | Pink | STANDARD | PINK | SPECIAL | 67891 | 33333 | 333333 | USD | No | ||||||
9 | Purple | STANDARD | PURPLE | SPECIAL | 67891 | 222222 | USD | No | |||||||
10 | Red | STANDARD | RED | SPECIAL | 12345 | 777777 | USD | ||||||||
11 | White | STANDARD | WHITE | 555555 | USD | ||||||||||
12 | Yellow | STANDARD | YELLOW | 11111 | 555555 | USD | No | ||||||||
BLANKET_DATA |
CUST_COLOR
IMPORT FILE EXAMPLE.xlsm | |||||
---|---|---|---|---|---|
A | B | C | |||
1 | COLOR | CUST ACCT | |||
2 | Green | Business1 | |||
3 | Yellow | Business2 | |||
4 | Blue | Business3 | |||
5 | Black | Business4 | |||
6 | Red | Business5 | |||
7 | Orange | Business6 | |||
8 | Pink | ||||
9 | Purple | ||||
10 | |||||
CUST_COLOR |
Example of end result IMPORT
IMPORT FILE EXAMPLE.xlsm | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | K | L | M | N | |||
1 | COLOR | TYPE | CUST ACCT | CUST CODE | COLOR CODE | Username 1 | Credential 1 | Credential 2 | Credential 3 | ACCT | ACCOUNT FLAG | Payment | ENABLE OVERRIDE | |||
2 | Green | STANDARD | Business1 | Business1 | GREEN | SPECIAL | 12345 | #### | USD | No | ||||||
3 | Green | STANDARD | Business2 | Business2 | GREEN | SPECIAL | 12345 | #### | USD | No | ||||||
4 | Green | STANDARD | Business3 | Business3 | GREEN | SPECIAL | 12345 | #### | USD | No | ||||||
5 | Green | STANDARD | Business4 | Business4 | GREEN | SPECIAL | 12345 | #### | USD | No | ||||||
6 | Green | STANDARD | Business5 | Business5 | GREEN | SPECIAL | 12345 | #### | USD | No | ||||||
7 | Green | STANDARD | Business6 | Business6 | GREEN | SPECIAL | 12345 | #### | USD | No | ||||||
8 | Yellow | STANDARD | Business1 | Business1 | YELLOW | 11111 | #### | USD | No | |||||||
9 | Yellow | STANDARD | Business2 | Business2 | YELLOW | 11111 | #### | USD | No | |||||||
10 | Yellow | STANDARD | Business3 | Business3 | YELLOW | 11111 | #### | USD | No | |||||||
11 | Yellow | STANDARD | Business4 | Business4 | YELLOW | 11111 | #### | USD | No | |||||||
12 | Yellow | STANDARD | Business5 | Business5 | YELLOW | 11111 | #### | USD | No | |||||||
13 | Yellow | STANDARD | Business6 | Business6 | YELLOW | 11111 | #### | USD | No | |||||||
14 | Blue | STANDARD | Business1 | Business1 | BLUE | SPECIAL | 67891 | 22222 | #### | No | USD | Yes | ||||
15 | Blue | STANDARD | Business2 | Business2 | BLUE | SPECIAL | 67891 | 22222 | #### | No | USD | Yes | ||||
16 | Blue | STANDARD | Business3 | Business3 | BLUE | SPECIAL | 67891 | 22222 | #### | No | USD | Yes | ||||
17 | Blue | STANDARD | Business4 | Business4 | BLUE | SPECIAL | 67891 | 22222 | #### | No | USD | Yes | ||||
18 | Blue | STANDARD | Business5 | Business5 | BLUE | SPECIAL | 67891 | 22222 | #### | No | USD | Yes | ||||
19 | Blue | STANDARD | Business6 | Business6 | BLUE | SPECIAL | 67891 | 22222 | #### | No | USD | Yes | ||||
20 | Black | STANDARD | Business1 | Business1 | BLACK | SPECIAL | 12345 | #### | USD | |||||||
21 | Black | STANDARD | Business2 | Business2 | BLACK | SPECIAL | 12345 | #### | USD | |||||||
22 | Black | STANDARD | Business3 | Business3 | BLACK | SPECIAL | 12345 | #### | USD | |||||||
23 | Black | STANDARD | Business4 | Business4 | BLACK | SPECIAL | 12345 | #### | USD | |||||||
24 | Black | STANDARD | Business5 | Business5 | BLACK | SPECIAL | 12345 | #### | USD | |||||||
25 | Black | STANDARD | Business6 | Business6 | BLACK | SPECIAL | 12345 | #### | USD | |||||||
26 | Red | STANDARD | Business1 | Business1 | RED | SPECIAL | 12345 | #### | USD | |||||||
27 | Red | STANDARD | Business2 | Business2 | RED | SPECIAL | 12345 | #### | USD | |||||||
28 | Red | STANDARD | Business3 | Business3 | RED | SPECIAL | 12345 | #### | USD | |||||||
29 | Red | STANDARD | Business4 | Business4 | RED | SPECIAL | 12345 | #### | USD | |||||||
30 | Red | STANDARD | Business5 | Business5 | RED | SPECIAL | 12345 | #### | USD | |||||||
31 | Red | STANDARD | Business6 | Business6 | RED | SPECIAL | 12345 | #### | USD | |||||||
32 | Orange | STANDARD | Business1 | Business1 | ORANGE | SPECIAL | 67891 | 22 | #### | USD | No | |||||
33 | Orange | STANDARD | Business2 | Business2 | ORANGE | SPECIAL | 67891 | 22 | #### | USD | No | |||||
34 | Orange | STANDARD | Business3 | Business3 | ORANGE | SPECIAL | 67891 | 22 | #### | USD | No | |||||
35 | Orange | STANDARD | Business4 | Business4 | ORANGE | SPECIAL | 67891 | 22 | #### | USD | No | |||||
36 | Orange | STANDARD | Business5 | Business5 | ORANGE | SPECIAL | 67891 | 22 | #### | USD | No | |||||
37 | Orange | STANDARD | Business6 | Business6 | ORANGE | SPECIAL | 67891 | 22 | #### | USD | No | |||||
38 | Pink | STANDARD | Business1 | Business1 | PINK | SPECIAL | 67891 | 33333 | #### | USD | No | |||||
39 | Pink | STANDARD | Business2 | Business2 | PINK | SPECIAL | 67891 | 33333 | #### | USD | No | |||||
40 | Pink | STANDARD | Business3 | Business3 | PINK | SPECIAL | 67891 | 33333 | #### | USD | No | |||||
41 | Pink | STANDARD | Business4 | Business4 | PINK | SPECIAL | 67891 | 33333 | #### | USD | No | |||||
42 | Pink | STANDARD | Business5 | Business5 | PINK | SPECIAL | 67891 | 33333 | #### | USD | No | |||||
43 | Pink | STANDARD | Business6 | Business6 | PINK | SPECIAL | 67891 | 33333 | #### | USD | No | |||||
44 | Purple | STANDARD | Business1 | Business1 | PURPLE | SPECIAL | 67891 | #### | USD | No | ||||||
45 | Purple | STANDARD | Business2 | Business2 | PURPLE | SPECIAL | 67891 | #### | USD | No | ||||||
46 | Purple | STANDARD | Business3 | Business3 | PURPLE | SPECIAL | 67891 | #### | USD | No | ||||||
47 | Purple | STANDARD | Business4 | Business4 | PURPLE | SPECIAL | 67891 | #### | USD | No | ||||||
48 | Purple | STANDARD | Business5 | Business5 | PURPLE | SPECIAL | 67891 | #### | USD | No | ||||||
49 | Purple | STANDARD | Business6 | Business6 | PURPLE | SPECIAL | 67891 | #### | USD | No | ||||||
50 | ||||||||||||||||
IMPORT |