Possibly...
Option Explicit
Sub Graphic2_Click()
'!!! This code deletes data. Test on a copy of your data !!!
Dim rg As Range
Application.ScreenUpdating = False
With Worksheets("Discipline")
Set rg = .Range("a5:k" & Cells(Rows.Count, 11).End(xlUp).Row)
rg.AutoFilter 11, "OK"
With rg.SpecialCells(xlCellTypeVisible)
If .Rows.Count < 2 Then
MsgBox "Nothing to Refresh", vbExclamation, "Process Incomplete"
Else
.Offset(, 1).Resize(, 9).Copy Worksheets("Register").Cells(Rows.Count, 2).End(xlUp).Offset(1)
.EntireRow.Delete
MsgBox "Sheet Refreshed", vbExclamation, "Process Complete"
End If
Application.CutCopyMode = False
End With
rg.AutoFilter
End With
Application.ScreenUpdating = True
End Sub
Sub TransferFJ()
'!!! This code deletes data. Test on a copy of your data !!!
Dim rg As Range
Application.ScreenUpdating = False
With Worksheets("Discipline")
Set rg = .Range("a5:k" & Cells(Rows.Count, 11).End(xlUp).Row)
rg.AutoFilter 11, "100%"
With rg.SpecialCells(xlCellTypeVisible)
If .Rows.Count < 2 Then
MsgBox "Dear Team, Only finished job can be transferred. Finish the job first.", vbExclamation, "Process Incomplete"
Else
.Offset(, 1).Resize(, 9).Copy Worksheets("Register").Cells(Rows.Count, 2).End(xlUp).Offset(1)
.EntireRow.Delete
MsgBox "Dear Team, Congrats !! Good Job. Finished jobs have been trasferred to Register", vbExclamation, "Director's Secretariat"
End If
Application.CutCopyMode = False
End With
rg.AutoFilter
End With
Application.ScreenUpdating = True
End Sub
Bookmarks