Autofilter Conditional Delete and Copy

koolgeex

New Member
Joined
May 2, 2012
Messages
45
Wondering if there's a macro that can do this when i press a button.

  1. In spreadsheet "Complete Backlog"
  2. Autofilter on
  3. Show rows where WIP Status (Column K) equals "Closed"
  4. Cut rows
  5. Paste into next available row of "Closed Jobs" spreadsheet. No overwrites.

Or you could switch step 5 and 6 so that the rows are copied over to "Closed Jobs" and then deleted from "Complete Backlog".

Ideas?
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Try this on a copy of your as it is untested

Sub Delete_Closed()
Application.ScreenUpdating = False
Sheets("Complete Backlog").Select
Dim LR As Long, i As Long
LR = Range("K" & Rows.count).End(xlUp).Row
For i = LR To 1 Step -1
If Range("K" & i).Value = "Closed" Then Rows(i).Cut Destination:=Sheets("Closed Jobs").Cells(Rows.count, "A").End(xlUp)
Next i
Application.ScreenUpdating = True
End Sub
 
Upvote 0

Forum statistics

Threads
1,216,038
Messages
6,128,450
Members
449,453
Latest member
jayeshw

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