VBA to copy certain data in a row to a new worksheet based on criteria

ggtrixabell

New Member
Joined
Sep 18, 2017
Messages
7
Hi,
I am very new to VBA and have been struggling to find everything I need in one place to complete a task I'd like to do. Any help would be much appreciated.

I have a risk register which captures threats and issues that may occur within my projects. The outcome of those could be a task or an opportunity. I would like to be able to have the team click a button which then runs a macro to look at any risks or issues that have an outcome as 'TASK' and then copy the details to a separate worksheet in my workbook so that the task table can be progressed away from the main capture table. The same goes for any opportunities.
The data would need to be copied and then have the values only pasted to the relevant table in the other 2 worksheets because I have formulas working out the reference number for each new threat/issue in the main table.
My data table on Sheet1 looks like this:

ABCDEFGHIJKLMNOPQRSTUVWXYZAAABACAD

REF
Project CodeProject NameProject LeadStatusDate RaisedTYPERaised ByDescImpactProximity1 (Dept)Proximity2 (Dept)Proximity (Timeline)CostRevenueQualityTimeframeAbsolute ProbAbsolute ImpactRisk ScoreRisk LevelOutcomeAssigned toActionStatusApproved ByApproval DateCompletion DateNotesDoc Ref Number
Calculated using the project code B & Name C with unique number -001 etc********TASK**
********Opportunity**


When the activex button is pressed, I'd like the macro to look for any new "TASK" or "Opportunity" (In column V) that has been added since the last time it was run and to then copy the data in that row but only cells A-I and W-X (I've starred the columns above) if possible, to the corresponding worksheet - Task or Opportunity..

I've managed to get as far as identifying the task or opportunity and copying the row onto the correct worksheet but that's it..

Sorry if this is a complicated explanation, my first time posting too...Any help much appreciated.

Thank you :)
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple

Forum statistics

Threads
1,214,925
Messages
6,122,303
Members
449,078
Latest member
nonnakkong

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