VBA Button That Will Clear Completed Job And Move Active Jobs UP

mdw8189

New Member
Joined
Apr 29, 2022
Messages
3
Office Version
  1. 2010
Platform
  1. Windows
I'd like to create a button that will clear completed jobs and move active jobs up when pressed. Column E is a drop down list where either "Complete" or "Active" can be selected. If "Complete" is selected, I'd like the contents in column E, F and H of that row to be cleared. If "Active" is selected, I'd like the contents in column E, F and H of that row to be cut and pasted the number of completed rows above. So if the first two jobs were completed on Machine 1, the remaining 3 "Active" jobs would move up two rows. Each machine contains 5 jobs and there are two blank rows between each machine. It is crucial that the contents in column G are not cleared as well as any content in the columns to the right of column H. Any ideas how this could be accomplished?

Machine
Job Status (Column E)​
Job Number (Column F)​
Job Name (Column G)​
Operation (Column H)​
Machine 1Complete1111
Job 1​
OP10
Machine 1Complete2222
Job 2​
OP30
Machine 1Active3333
Job 3​
OP50
Machine 1Active4444
Job 4​
OP30
Machine 1Active5555
Job 5​
OP40
Machine 2Complete6666Job 1OP40
Machine 2Complete7777Job 2OP10
Machine 2Complete8888Job 3OP30
Machine 2Active9999Job 4OP30
Machine 2Active0000Job 5OP10
Machine 3Complete1313Job 1OP50
Machine 3Active1414Job 2OP10
Machine 3Active1515Job 3OP10
Machine 3Active1616Job 4OP20
Machine 3Active1717Job 5OP10
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
Welcome to the Board!

I think it would be really beneficial/helpful if you could show us what the expected output from your data sample in your original post should look like.
 
Upvote 0

Forum statistics

Threads
1,215,250
Messages
6,123,887
Members
449,131
Latest member
leobueno

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