筛选出来的单元格,粘贴成值

Sub ConvAfterFilter()
On Error Resume Next
Application.ScreenUpdating = False
Dim Rng As Range
For Each Rng In ActiveSheet.AutoFilter.Range.SpecialCells(xlCellTypeVisible)
If Rng.HasFormula Then
Rng.Copy
Rng.PasteSpecial xlValues
End If
Next
Application.CutCopyMode = False
Application.ScreenUpdating = True
End Sub

你可能感兴趣的:(学习)