Applies To
Range Object.
Description
Pastes a Range from the Clipboard to the specified range.
Syntax
object.PasteSpecial(paste, operation, skipBlanks, transpose)
object
Required. The Range object.
paste
Optional. Specifies the part of the range to be pasted (one of xlAll, xlFormulas, xlValues, xlFormats, xlNotes, or xlAllExceptBorders). If omitted, the default is xlAll.
operation
Optional. Specifies the paste operation (one of xlNone, xlAdd, xlSubtract, xlMultiply, or xlDivide). If omitted, the default is xlNone.
skipBlanks
Optional. If True, blank cells in the Range on the Clipboard will not be pasted into the destination. If omitted, the default is False.
transpose
Optional. If True, rows and columns are transposed when the Range is pasted. If omitted, the default is False.
See Also
Copy Method, Cut Method, Paste Method, PasteSpecial Method (DialogSheet or Worksheet Object).
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.
Worksheets("Sheet1").Range("C1:C5").Copy Worksheets("Sheet1").Range("D1:D5").PasteSpecial operation:=xlAdd