目的地:=只移动值?

我正在使用下面的一段代码来移动数据,如果有任何东西被标记为是,但是,使用这个任何数据validation等也移动。 有没有我可以得到以下的工作,只放置细胞的价值,离开原来的数据validation等在新的工作表上? 我已经尝试.value和使用.PasteSpecial,我目前卡住了。

If Application.WorksheetFunction.CountIf(Range("G8:G101"), "Yes") >= 1 Then Selection.AutoFilter Field:=6, Criteria1:="Yes" Range("B8:F101").Copy Destination:=Sheet4.Range("B" & Rows.Count).End(xlUp).Offset(1) Range("H8:L101").Copy Destination:=Sheet4.Range("G" & Rows.Count).End(xlUp).Offset(1) Range("B8:K101").ClearContents Selection.AutoFilter Field:=6 

请将您的原始代码作为PasteSpecial工作。

无论如何:

 'PasteSpecial method 'note: destination cells outside the original count will be unchanged Range("B8:F101").Copy Sheet4.Range("B" & Rows.Count).End(xlUp).Offset(1).PasteSpecial xlPasteValues 'direct assignment method 'note: destination cells outside the original count will be overwritten with #N/A Sheet4.Range("B" & Rows.Count).End(xlUp).Offset(1).Value = Range("B8:F101").Value