Hi all,
I have the VBA code below. What it does is that if Status column in column O in sheet4 contains "Completed", it pastes the row into the sheet1. How can I modify this code so that it will paste values only? I do not want formulas to be pasted. Values only.
"Sub CopyOverRecord()
Dim StatusCol As Range
Dim Status As Range
Dim PasteCell As Range
Set StatusCol = Sheet4.Range("o2300")
For Each Status In StatusCol
If Sheet1.Range("A2") = "" Then
Set PasteCell = Sheet1.Range("A2")
Else
Set PasteCell = Sheet1.Range("A1").End(xlDown).Offset(1, 0)
End If
If Status = "Completed" Then Status.Offset(0, -14).Resize(1, 14).Copy PasteCell
Next Status
Del_O
End Sub"
Thanks!
I have the VBA code below. What it does is that if Status column in column O in sheet4 contains "Completed", it pastes the row into the sheet1. How can I modify this code so that it will paste values only? I do not want formulas to be pasted. Values only.
"Sub CopyOverRecord()
Dim StatusCol As Range
Dim Status As Range
Dim PasteCell As Range
Set StatusCol = Sheet4.Range("o2300")
For Each Status In StatusCol
If Sheet1.Range("A2") = "" Then
Set PasteCell = Sheet1.Range("A2")
Else
Set PasteCell = Sheet1.Range("A1").End(xlDown).Offset(1, 0)
End If
If Status = "Completed" Then Status.Offset(0, -14).Resize(1, 14).Copy PasteCell
Next Status
Del_O
End Sub"
Thanks!