Wardylewis
New Member
- Joined
- Jun 7, 2016
- Messages
- 37
Good Evening,
I have a sheet called Employee List which holds information on every employee and what tests they require.
However, when employees need booking in for tests it takes a fair bit of sorting, is very time consuming and messy which leads to data input errors.
I was wondering if there was a way that I could do this automatically with VBA and transfer employees based on a specific criteria.
In worksheet "employee list" I have 25 columns which hold various pieces of data. Need it to start on row 6 and then check down to the end row looking to see if column 25 matches the set criteria.
Employee List
[TABLE="width: 500"]
<tbody>[TR]
[TD]Emp ID[/TD]
[TD]First Name[/TD]
[TD]Surname[/TD]
[TD]Dept[/TD]
[TD]Unit[/TD]
[TD]Site[/TD]
[TD]Shift[/TD]
[TD]A[/TD]
[TD]Atime[/TD]
[TD]C[/TD]
[TD]Ctime[/TD]
[TD]F[/TD]
[TD]FTime[/TD]
[TD="align: center"]Shortest Time[/TD]
[/TR]
[TR]
[TD="align: center"]11[/TD]
[TD="align: center"]Mickey[/TD]
[TD="align: center"]Mouse[/TD]
[TD="align: center"]Costume[/TD]
[TD="align: center"]D1[/TD]
[TD="align: center"]Disney[/TD]
[TD="align: center"]Days[/TD]
[TD="align: center"]Yes[/TD]
[TD="align: center"]20[/TD]
[TD="align: center"]Yes[/TD]
[TD="align: center"]20[/TD]
[TD="align: center"]Yes[/TD]
[TD="align: center"]20[/TD]
[TD="align: center"]-10
[/TD]
[/TR]
</tbody>[/TABLE]
The booking sheet has ComboBox1 which has a value of either 30/60/90 and when a value has been selected and CommandButton1 is pressed I need it to search column 25 on the Employee List sheet and then paste the information from the columns 1 - 7, 13,15 etc and place it into the booking sheet starting from B3.
I have looked online and google all afternoon but cannot seem to get it right. It either throws errors or pastes the data on top of each other.
I am new to VBA so an explanation of how it works and what it is doing would be really useful so I can learn from my mistakes.
Thank you for any support it is greatly appreciated.
I have a sheet called Employee List which holds information on every employee and what tests they require.
However, when employees need booking in for tests it takes a fair bit of sorting, is very time consuming and messy which leads to data input errors.
I was wondering if there was a way that I could do this automatically with VBA and transfer employees based on a specific criteria.
In worksheet "employee list" I have 25 columns which hold various pieces of data. Need it to start on row 6 and then check down to the end row looking to see if column 25 matches the set criteria.
Employee List
[TABLE="width: 500"]
<tbody>[TR]
[TD]Emp ID[/TD]
[TD]First Name[/TD]
[TD]Surname[/TD]
[TD]Dept[/TD]
[TD]Unit[/TD]
[TD]Site[/TD]
[TD]Shift[/TD]
[TD]A[/TD]
[TD]Atime[/TD]
[TD]C[/TD]
[TD]Ctime[/TD]
[TD]F[/TD]
[TD]FTime[/TD]
[TD="align: center"]Shortest Time[/TD]
[/TR]
[TR]
[TD="align: center"]11[/TD]
[TD="align: center"]Mickey[/TD]
[TD="align: center"]Mouse[/TD]
[TD="align: center"]Costume[/TD]
[TD="align: center"]D1[/TD]
[TD="align: center"]Disney[/TD]
[TD="align: center"]Days[/TD]
[TD="align: center"]Yes[/TD]
[TD="align: center"]20[/TD]
[TD="align: center"]Yes[/TD]
[TD="align: center"]20[/TD]
[TD="align: center"]Yes[/TD]
[TD="align: center"]20[/TD]
[TD="align: center"]-10
[/TD]
[/TR]
</tbody>[/TABLE]
The booking sheet has ComboBox1 which has a value of either 30/60/90 and when a value has been selected and CommandButton1 is pressed I need it to search column 25 on the Employee List sheet and then paste the information from the columns 1 - 7, 13,15 etc and place it into the booking sheet starting from B3.
I have looked online and google all afternoon but cannot seem to get it right. It either throws errors or pastes the data on top of each other.
I am new to VBA so an explanation of how it works and what it is doing would be really useful so I can learn from my mistakes.
Thank you for any support it is greatly appreciated.