Good afternoon all, I have this code below which is copying and pasting data from sheet3 to sheet 47 when column F has either "RI" or "Issue" written in it. The code works but it is also pasting any formulas and comments I have in the data. Is there a way to make this work with values only?
Thank you!
Sub Live_CWO()
Dim StatusCol As Range
Dim Status As Range
Dim Pastecell As Range
Set StatusCol = Sheet3.Range("F4:F50")
For Each Status In StatusCol
If Sheet47.Range("A2") = "" Then
Set Pastecell = Sheet47.Range("A2")
Else
Set Pastecell = Sheet47.Range("A1").End(xlDown).Offset(1, 0)
End If
If Status = "RI" Then Status.Offset(0, -2).Resize(1, 5).Copy Pastecell
If Status = "ISSUE" Then Status.Offset(0, -2).Resize(1, 5).Copy Pastecell
Next Status
End Sub
Thank you!
Sub Live_CWO()
Dim StatusCol As Range
Dim Status As Range
Dim Pastecell As Range
Set StatusCol = Sheet3.Range("F4:F50")
For Each Status In StatusCol
If Sheet47.Range("A2") = "" Then
Set Pastecell = Sheet47.Range("A2")
Else
Set Pastecell = Sheet47.Range("A1").End(xlDown).Offset(1, 0)
End If
If Status = "RI" Then Status.Offset(0, -2).Resize(1, 5).Copy Pastecell
If Status = "ISSUE" Then Status.Offset(0, -2).Resize(1, 5).Copy Pastecell
Next Status
End Sub