I am using the following code to autofilter the data on one sheet and paste specific columns onto another sheet. The issue I have is that the data on the wsData sheet in columns AG and AJ is formula, but I need it to be pasted as values. How do I amend this code to do this?
With wsData.Rows(1)
.AutoFilter field:=30, Criteria1:="In Progress - On Order"
If wsData.Range("AC1:C" & lastrow).SpecialCells(xlCellTypeVisible).Cells.Count > 1 Then
wsData.Range("N2:N" & lastrow).SpecialCells(xlCellTypeVisible).Copy wsDest.Range("A" & Rows.Count).End(3)(2)
wsData.Range("C2:C" & lastrow).SpecialCells(xlCellTypeVisible).Copy wsDest.Range("B" & Rows.Count).End(3)(2)
wsData.Range("Q2:Q" & lastrow).SpecialCells(xlCellTypeVisible).Copy wsDest.Range("F" & Rows.Count).End(3)(2)
wsData.Range("R2:R" & lastrow).SpecialCells(xlCellTypeVisible).Copy wsDest.Range("G" & Rows.Count).End(3)(2)
wsData.Range("S2:S" & lastrow).SpecialCells(xlCellTypeVisible).Copy wsDest.Range("H" & Rows.Count).End(3)(2)
wsData.Range("T2:T" & lastrow).SpecialCells(xlCellTypeVisible).Copy wsDest.Range("I" & Rows.Count).End(3)(2)
wsData.Range("AG2:AG" & lastrow).SpecialCells(xlCellTypeVisible).Copy wsDest.Range("C" & Rows.Count).End(3)(2)
wsData.Range("AJ2:AJ" & lastrow).SpecialCells(xlCellTypeVisible).Copy wsDest.Range("M" & Rows.Count).End(3)(2)
wsDest.UsedRange.Borders.ColorIndex = xlNone
wsDest.Select
End If
.AutoFilter field:=30
End with
Many thanks,