调整模块只粘贴值,而不是公式

有人可以帮助我吗? 我运行下面的模块,它工作正常,但它粘贴单元格(公式)的内容,而不是值。 我知道这是一个特殊的粘贴价值,但不知道在哪里调整。 此外,我想在复制跨越A:K的variables表中的行,然后粘贴到标识表。 对不起,如果不清楚,不知道为什么代码显示下面的搞笑。 从子开始:

Sub armine_profitTEST() Dim r As Long, endRow As Long, pasteRowIndex As Long endRow = 500 ' of course it's best to retrieve the last used row number via a function pasteRowIndex = 5 For r = 1 To endRow 'Loop through sheet1 and search for your criteria If Cells(r, Columns("F").Column).Value = "Armine" Then 'Found 'Copy the current row Rows(r).Select Selection.Copy 'Switch to the sheet where you want to paste it & paste Sheets("Armine").Select Rows(pasteRowIndex).Select ActiveSheet.Paste 'Next time you find a match, it will be pasted in a new row pasteRowIndex = pasteRowIndex + 1 'Switch back to your table & continue to search for your criteria Sheets("Summary").Select End If Next r End Sub 

只需使用pasteSpecial

 Dim xRng As Microsoft.Office.Interop.Excel.Range xRng.PasteSpecial(Microsoft.Office.Interop.Excel.XlPasteType.xlPasteFormulas)