Good Day!
I would like to see if its possible to do the following via VBA:
Example sheet2:
Example of desired result:
Keep in mind, I would like to designate everything by column header name. Thanks in advance!
I would like to see if its possible to do the following via VBA:
- Define a column header (header = result) in sheet1 to look at values
- If value in result header = 0 copy contents from row for header "Make", "Model" and "ID"
- Paste contents from above to sheet2 in rows with column headers "Make","Model" and "ID" below existing data in sheet2
RVTools_export_dfw5infvcn001_2020-03-24_15.09.19 (1).xlsx | ||||||
---|---|---|---|---|---|---|
A | B | C | D | |||
1 | Make | Model | Result | ID | ||
2 | Ford | F150 | 1 | 9255 | ||
3 | Honda | Accord | 0 | 9265 | ||
4 | Chevy | Bolt | 1 | 8652 | ||
5 | Lexus | IS | 0 | 1927 | ||
6 | Ford | Bronco | 0 | 1025 | ||
7 | Ford | F250 | 1 | 3952 | ||
8 | Honda | Pilot | 1 | 1257 | ||
9 | Chevy | Blazer | 1 | 2217 | ||
10 | Lexus | ES | 0 | 6364 | ||
Sheet1 |
Example sheet2:
RVTools_export_dfw5infvcn001_2020-03-24_15.09.19 (1).xlsx | |||||
---|---|---|---|---|---|
A | B | C | |||
1 | Make | Model | ID | ||
2 | Ford | F150 | 5467 | ||
3 | Honda | Accord | 5487 | ||
4 | Chevy | Bolt | 2125 | ||
5 | Lexus | IS | 5688 | ||
6 | Ford | Bronco | 6214 | ||
7 | Ford | F250 | 3347 | ||
8 | Honda | Pilot | 4496 | ||
9 | Chevy | Blazer | 5568 | ||
10 | Lexus | ES | 2148 | ||
Sheet2 |
Example of desired result:
RVTools_export_dfw5infvcn001_2020-03-24_15.09.19 (1).xlsx | |||||
---|---|---|---|---|---|
A | B | C | |||
1 | Make | Model | ID | ||
2 | Ford | F150 | 5467 | ||
3 | Honda | Accord | 5487 | ||
4 | Chevy | Bolt | 2125 | ||
5 | Lexus | IS | 5688 | ||
6 | Ford | Bronco | 6214 | ||
7 | Ford | F250 | 3347 | ||
8 | Honda | Pilot | 4496 | ||
9 | Chevy | Blazer | 5568 | ||
10 | Lexus | ES | 2148 | ||
11 | Honda | Accord | 9265 | ||
12 | Lexus | IS | 1927 | ||
13 | Ford | Bronco | 1025 | ||
14 | Lexus | ES | 6364 | ||
Sheet2 |
Keep in mind, I would like to designate everything by column header name. Thanks in advance!