I'm using 2003 (company computer ).
I need the macros to manipulate cells not entire rows So here's the algorithm: If a cell in Column K of the "Complete Backlog" spreadhseet is equal to "Closed" then cut cells A?:K? of the same row and paste into the next available row of the spreadsheet named "Closed Jobs".
[Single example: On "Complete Backlog" spreadhseet, if K2 = "Closed", cut A2:K2 and paste into A?:K? of "Closed Jobs" speadsheet in the same workbook.]
I have the following code, but it just completely deletes all of the content on one sheet for whatever reason. Not sure what I did or how I can fix it.
I need the macros to manipulate cells not entire rows So here's the algorithm: If a cell in Column K of the "Complete Backlog" spreadhseet is equal to "Closed" then cut cells A?:K? of the same row and paste into the next available row of the spreadsheet named "Closed Jobs".
[Single example: On "Complete Backlog" spreadhseet, if K2 = "Closed", cut A2:K2 and paste into A?:K? of "Closed Jobs" speadsheet in the same workbook.]
I have the following code, but it just completely deletes all of the content on one sheet for whatever reason. Not sure what I did or how I can fix it.
Code:
Sub refresh()
Dim MY_ROWS As Long
With Sheets("Complete Backlog")
For MY_ROWS = 1 To .Range("A" & Rows.Count).End(xlUp).Row
If .Range("M" & MY_ROWS).Value = "Close" Then
.Rows(MY_ROWS).Cut Destination:=Sheets("Closed Jobs").Range("A" & Rows.Count).End(xlUp).Offset(1)
End If
Next MY_ROWS
On Error Resume Next
.Columns("M").SpecialCells(xlCellTypeBlanks).EntireRow.delete
End With
Application.CutCopyMode = False
End Sub