epactheactor
New Member
- Joined
- Sep 9, 2015
- Messages
- 38
Hello!
I'm studying VBA and actually trying to get a degree in programming so every chance I get to practice at work with code, I do so.
I've come up with something I want to do, but can't get my head around HOW to do it.
On Workbook 1 (called "Line" as an example), I would have 2 columns with one being Start and the other End (columns D & E). These would a path in feet for inspection.
Also on this sheet, there would be a section for the information on who and when they did the inspection on different parts of the line (A1:C4).
Example;
<tbody>
</tbody>
Now to make this harder, the Inspector ID information (A1:C4) comes from a different workbook called "Inspector ID". It is presented like this;
<tbody>
</tbody>
I've created a code that puts the Inspector ID section (range A2:C4) information into workbook "Line" from workbook "Inspector ID." After it does, I've been manually filling out the "Inspected By" (C6:C10) section.
My question is, how would I go about filling out the "Inspected By" column in "Line"? It would have to reference the "Inspector ID" workbook to see the footages of who did which.
I would think I would need to create each Inspector info as an array/index, then compare the To and From.
Any help would be greatly appreciated.
I'm studying VBA and actually trying to get a degree in programming so every chance I get to practice at work with code, I do so.
I've come up with something I want to do, but can't get my head around HOW to do it.
On Workbook 1 (called "Line" as an example), I would have 2 columns with one being Start and the other End (columns D & E). These would a path in feet for inspection.
Also on this sheet, there would be a section for the information on who and when they did the inspection on different parts of the line (A1:C4).
Example;
1 | A | B | C | D | E |
2 | Inspector ID section | Name | Date | ||
3 | A | Joe | 5/1/2019 | ||
4 | G | Dana | 6/5/2016 | ||
5 | |||||
6 | Inspected by | To (feet) | From (feet) | ||
7 | A | 0 | 7 | ||
8 | G | 7 | 50 | ||
9 | A | 50 | 62 | ||
10 | A | 62 | 100 | ||
11 | |||||
12 | |||||
13 |
<tbody>
</tbody>
Now to make this harder, the Inspector ID information (A1:C4) comes from a different workbook called "Inspector ID". It is presented like this;
Inspector Info | Name | Date Inspected (newest - oldest) | Inspected To (feet) | Inspected From (feet) |
A | Joe | 5/1/2019 | 0 | 7 |
A | Joe | 5/1/2019 | 50 | 62 |
A | Joe | 5/1/2019 | 62 | 100 |
D | Dana | 6/5/2016 | 7 | 50 |
<tbody>
</tbody>
I've created a code that puts the Inspector ID section (range A2:C4) information into workbook "Line" from workbook "Inspector ID." After it does, I've been manually filling out the "Inspected By" (C6:C10) section.
My question is, how would I go about filling out the "Inspected By" column in "Line"? It would have to reference the "Inspector ID" workbook to see the footages of who did which.
I would think I would need to create each Inspector info as an array/index, then compare the To and From.
Any help would be greatly appreciated.