auto move row when complete

lilgreen

New Member
Joined
May 10, 2019
Messages
15
Hello,

I want to move the entire row when I have 100% complete in "F" cell to new sheet deleting the old. Sheet name "ActionItem" move to sheet "Completed" I would also like to keep original formatting but it isn't necessary.

abcdefgh
requestfrompriorityassignedduestatusnotesdate updated

<tbody>
</tbody>

Thank you,
Steven
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
Do you enter 100 in column F manually or is the 100 a result of a formula? Is column F formatted as a percent? If entered manually, do you want to move the row one at a time as 100 is entered into column F?
 
Upvote 0
yes I enter 100 manually and the field is formatted to percentage. I have some default pull downs for that field: not started, 25, 50, 75, 100 pending, and on hold. Yes as soon as 100 is entered I want to move that entire row over.
 
Upvote 0
Copy and paste this macro into the worksheet code module. Do the following: right click the tab name for your "ActionItem" 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. The macro is triggered automatically whenever a value in column F is changed so you have to make sure that all the other columns are filled out first before selecting 100% from the drop down.

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
    If Intersect(Target, Range("F:F")) Is Nothing Then Exit Sub
    Dim desWS As Worksheet
    Set desWS = Sheets("Completed")
    With Application
        .ScreenUpdating = False
        .EnableEvents = False
    End With
    If Target = 1 Then
        Target.EntireRow.Copy desWS.Cells(desWS.Rows.Count, "A").End(xlUp).Offset(1, 0)
        Target.EntireRow.Delete
    End If
    With Application
        .ScreenUpdating = True
        .EnableEvents = True
    End With
End Sub
 
Upvote 0
I get an error "Complie error: Ambiguous name detected: Worksheet_Change. I have another code running
Private Sub Worksheet_Change(ByVal Target As Range)


Dim cell As Range

Application.ScreenUpdating = False

For Each cell In Target
Application.EnableEvents = False
Cells(cell.Row, "H") = Now()
Application.EnableEvents = True
Next cell

Application.ScreenUpdating = True

End Sub

Does this matter? Not good with code so please excuse me. I am learning.
 
Upvote 0

Forum statistics

Threads
1,214,522
Messages
6,120,019
Members
448,938
Latest member
Aaliya13

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