다음을 통해 공유


Range.PasteSpecial Method (Excel)

Pastes a Range from the Clipboard into the specified range.

Syntax

.PasteSpecial(Paste, Operation, SkipBlanks, Transpose)

A variable that represents a Range object.

Parameters

Name

Required/Optional

Data Type

Description

Paste

선택

XlPasteType

. The part of the range to be pasted.

Operation

선택

XlPasteSpecialOperation

. The paste operation.

SkipBlanks

선택

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

선택

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

참고 항목

개념

Range Object

Range Object Members