Range.PasteSpecial method (Excel)
Pastes a Range object that has been copied into the specified range.
Syntax
expression.PasteSpecial (Paste, Operation, SkipBlanks, Transpose)
expression A variable that represents a Range object.
Parameters
Name | Required/Optional | Data type | Description |
---|---|---|---|
Paste | Optional | XlPasteType | The part of the range to be pasted, such as xlPasteAll or xlPasteValues. |
Operation | Optional | XlPasteSpecialOperation | The paste operation, such as xlPasteSpecialOperationAdd. |
SkipBlanks | Optional | Variant | True to have blank cells in the range on the clipboard not be pasted into the destination range. The default value is False. |
Transpose | Optional | Variant | True to transpose rows and columns when the range is pasted. The default value is False. |
Return value
Variant
Example
This example replaces the data in cells D1:D5 on Sheet1 with the sum of the existing contents and cells C1:C5 on Sheet1.
With Worksheets("Sheet1")
.Range("C1:C5").Copy
.Range("D1:D5").PasteSpecial _
Operation:=xlPasteSpecialOperationAdd
End With
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기