not sure where to start this one as im still developing my VBA abilities.
I have the code below which Searches in column Q for the word "Yes", and then moves that row to a new sheet named "Archive", then deletes that row from the "Quality Log"
The issue at hand is that it pastes the whole row including formulas but i just want the code to paste Values only.
any ideas on i can change this code to do so. cheers in advance.
Sub ArchiveReworked()
Dim xRg As Range
Dim xCell As Range
Dim i As Long
Dim j As Long
Dim K As Long
i = Worksheets("Quality Log").UsedRange.Rows.Count
j = Worksheets("Actioned").UsedRange.Rows.Count
If j = 1 Then
If Application.WorksheetFunction.CountA(Worksheets("Actioned").UsedRange) = 0 Then j = 0
End If
Set xRg = Worksheets("Quality Log").Range("Q4:Q" & i)
On Error Resume Next
Application.ScreenUpdating = False
For K = 1 To xRg.Count
If CStr(xRg(K).Value) = "Yes" Then
xRg(K).EntireRow.Copy Destination:=Worksheets("Actioned").Range("A" & j + 1)
xRg(K).EntireRow.Delete
If CStr(xRg(K).Value) = "Yes" Then
K = K - 1
End If
j = j + 1
End If
Next
Call ResizeArchiveTable
Application.ScreenUpdating = True
End Sub