VBA - Copy Cells from one sheet to another based on ComboBox value

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
Emp IDFirst NameSurnameDeptUnitSiteShiftAAtimeCCtimeFFTimeShortest Time
11MickeyMouseCostumeD1DisneyDaysYes20Yes20Yes20-10

<tbody>
</tbody>


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.
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
I do not understand this:
paste the information from the columns 1 - 7, 13,15 etc

1-7,13,15 etc. what would etc. look like I see no trend here.

Do you mean copy entire row?

And if copy entire row we cannot start the pasting in Column B

 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,429
Messages
6,124,838
Members
449,193
Latest member
MikeVol

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top