humility36
New Member
- Joined
- Dec 16, 2019
- Messages
- 7
- Office Version
- 2016
- Platform
- Windows
Good Morning Friends,
I have an employee training spread sheet that lists out the employee and all the areas that they are trained in. However, the row is super long because their are a lot of areas across different departments that they could be trained in. My row currently goes all the way to BB so I have to scroll a long way to see what they are trained in and I'm only interested in what they are trained in. I have a legend the defines their training status: X=trained - NT=Needs test - NA =Needs assessment - S=safety / re-certify
I want to write some vba code that could "look" for any of these values in the cell and then copy the value and the cell to the right (job) and paste it in a list form.
CURRENT STATE - this is a sample of how my employee sheet looks like now.
The VBA code will "look" for any of the 4 values in the cell and simply
1. copy the cell value and the cell to the right and past it in the same worksheet just down some rows 27 - 31
2. transpose and paste ONCE the basic employee info in rows 20 -25
FUTURE STATE
This seems very simple to me, but I can't seem to get it right. Any help would be super appreciated and I hope this is clear and easy to understand. Since there is only 4 values that could be in any of the cells I thought maybe these values could be defined in the VBA. Because there might be multiple rows for the employee I also thought I would be to create a loop to search each of the rows. I don't know VBA code enough to write it out. Thanks everyone in advance for taking a look and helping out.
Best Regards,
- Humility36
I have an employee training spread sheet that lists out the employee and all the areas that they are trained in. However, the row is super long because their are a lot of areas across different departments that they could be trained in. My row currently goes all the way to BB so I have to scroll a long way to see what they are trained in and I'm only interested in what they are trained in. I have a legend the defines their training status: X=trained - NT=Needs test - NA =Needs assessment - S=safety / re-certify
I want to write some vba code that could "look" for any of these values in the cell and then copy the value and the cell to the right (job) and paste it in a list form.
CURRENT STATE - this is a sample of how my employee sheet looks like now.
A | B | C | D | E | G | H | I | J | K | L | M | N | |
1 | ID | First Name | Last Name | Bid | Shift | trained | job | trained | job | trained | job | trained | job |
2 | 12345 | John | Doe | auditor | day | X | forklift | NA | loading | closer | NT | de-pallet | |
3 | 12345 | John | Doe | auditor | day | small case | X | DC to DC | Mods | X | breakpack | ||
4 |
The VBA code will "look" for any of the 4 values in the cell and simply
1. copy the cell value and the cell to the right and past it in the same worksheet just down some rows 27 - 31
2. transpose and paste ONCE the basic employee info in rows 20 -25
FUTURE STATE
A | B | C | D | |
20 | ID | 12345 | ||
21 | First Name | Johnn | ||
23 | Last Name | Doe | ||
24 | Bid | auditor | ||
25 | Shift | day | ||
26 | ||||
27 | Forklift | X | ||
29 | loading | NA | ||
29 | De-pallet | NT | ||
30 | DC to DC | X | ||
31 | breakpack | X | ||
This seems very simple to me, but I can't seem to get it right. Any help would be super appreciated and I hope this is clear and easy to understand. Since there is only 4 values that could be in any of the cells I thought maybe these values could be defined in the VBA. Because there might be multiple rows for the employee I also thought I would be to create a loop to search each of the rows. I don't know VBA code enough to write it out. Thanks everyone in advance for taking a look and helping out.
Best Regards,
- Humility36