Moving row to a new sheet based on cell value

Rturk

New Member
Joined
Oct 9, 2020
Messages
2
Office Version
  1. 365
Platform
  1. Windows
There are previous threads on this (copy row and a cut row) but I have been unable to get either code to work.
I have a workbook I call "Pipeline (date)" inside that workbook I have a spreadsheet called "Opportunities" and in column J of this spreadsheet I have created a drop down menu the selection I want to trigger a move is "6. Awarded"
I would love to make it so once I selected "6. Awarded" and ran the macro it would move that opportunity to another spreadsheet which I have titled "Awards"
I would like the move to be a cut and paste.
Any help would be appreciated.
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
Copy and paste this macro into the worksheet code module. Do the following: right click the tab name for your "Opportunities" sheet and click 'View Code'. Paste the macro into the empty code window that opens up. Close the code window to return to your sheet. Make a selection in column J.
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
    If Intersect(Target, Range("J:J")) Is Nothing Then Exit Sub
    Application.EnableEvents = False
    If Target = "6. Awarded" Then
        Target.EntireRow.Copy Sheets("Awards").Cells(Sheets("Awards").Rows.Count, "A").End(xlUp).Offset(1)
        Target.EntireRow.Delete
    End If
    Application.EnableEvents = True
End Sub
 
Upvote 0
Thank you!!! Worked like a charm!!!!

I do have a follow up. Now that I have this code if there was another column and cell I want to provide conditions on, can I just add it below this code? Or do I need to save them as separate macros?
 
Upvote 0
You are very welcome. :)
Now that I have this code if there was another column and cell I want to provide conditions on, can I just add it below this code? Or do I need to save them as separate macros?
Please describe in detail exactly what you want to do referring to specific cells, rows, columns and sheets.
 
Upvote 0

Forum statistics

Threads
1,214,943
Messages
6,122,380
Members
449,080
Latest member
Armadillos

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