PASTE.SPECIAL macro

Equivalent to clicking the Paste Special command on the Edit menu. Pastes the specified components from the copy area into the current selection. The PASTE.SPECIAL function has four syntax forms.

Syntax 1   Pasting into a sheet or macro sheet

Syntax 2   Copying from a sheet and pasting into a chart.

Syntax 3   Copying and pasting between charts

Syntax 4   Pasting information from another application.

Return to index

PASTE.SPECIAL Syntax 1

Equivalent to clicking the Paste Special command on the Edit menu. Pastes the specified components from the copy area into the current selection. The PASTE.SPECIAL function has four syntax forms. Use syntax 1 if you are pasting into a sheet or macro sheet.

Syntax

PASTE.SPECIAL(paste_num, operation_num, skip_blanks, transpose)

PASTE.SPECIAL?(paste_num, operation_num, skip_blanks, transpose)

Paste_num    is a number from 1 to 6 specifying what to paste. Paste_num can also be quoted text of the object you want to paste.

Paste_num Pastes
1 All
2 Formulas
3 Values
4 Formats
5 Comments
6 All except borders

Operation_num    is a number from 1 to 5 specifying which operation to perform when pasting.

Operation_num Action
1 None
2 Add
3 Subtract
4 Multiply
5 Divide

Skip_blanks    is a logical value corresponding to the Skip Blanks check box in the Paste Special dialog box.

 

Transpose    is a logical value corresponding to the Transpose check box in the Paste Special dialog box.

 

Related Functions

FORMULA   Enters values into a cell or range or onto a chart

PASTE   Pastes cut or copied data

PASTE.LINK   Pastes copied data and establishes a link to its source

Syntax 2   Copying from a sheet and pasting into a chart.

Syntax 3   Copying and pasting between charts

Syntax 4   Pasting information from another application.

Return to index

PASTE.SPECIAL Syntax 2

Equivalent to clicking the Paste Special command on the Edit menu on the Chart menu bar. Pastes the specified components from the copy area into a chart. The PASTE.SPECIAL function has four syntax forms. Use syntax 2 if you have copied from a sheet and are pasting into a chart.

Syntax

PASTE.SPECIAL(rowcol, titles, categories, replace, series)

PASTE.SPECIAL?(rowcol, titles, categories, replace, series)

Rowcol    is the number 1 or 2 and specifies whether the values corresponding to a particular data series are in rows or columns. Enter 1 for rows or 2 for columns.

Titles    is a logical value corresponding to the Series Names In First Column check box (or First Row, depending on the value of rowcol) in the Paste Special dialog box.

 

Categories    is a logical value corresponding to the Categories (X Labels) In First Row (or First Column, depending on the value of rowcol) check box in the Paste Special dialog box.

Replace    is a logical value corresponding to the Replace Existing Categories check box in the Paste Special dialog box.

Series    is a number specifying how cells are added to a chart.

Series Added as
1 New series
2 New point(s)

Related Functions

Syntax 1   Pasting into a sheet or macro sheet

Syntax 3   Copying and pasting between charts

Syntax 4   Pasting information from another application

Return to index

PASTE.SPECIAL Syntax 3

Equivalent to clicking the Paste Special command on the Edit menu on the Chart menu bar. Pastes the specified components from the copy area into a chart. The PASTE.SPECIAL function has four syntax forms. Use syntax 3 if you have copied from a chart and are pasting into a chart.

Syntax

PASTE.SPECIAL(paste_num)

PASTE.SPECIAL?(paste_num)

Paste_num    is a number from 1 to 3 specifying what to paste.

Paste_num Pastes
1 All (formats and data series)
2 Formats only
3 Formulas (data series) only

Related Functions

Syntax 1   Pasting into a sheet or macro sheet

Syntax 2   Copying from a sheet and pasting into a chart

Syntax 4   Pasting information from another application

Return to index

PASTE.SPECIAL Syntax 4

Equivalent to clicking the Paste Special command on the Edit menu when pasting data from another application into Microsoft Excel. Use syntax 4 when pasting information from another application.

Syntax

PASTE.SPECIAL(format_text, pastelink_logical, display_icon_logical, icon_file, icon_number, icon_label)

PASTE.SPECIAL?(format_text, pastelink_logical, display_icon_logical, icon_file, icon_number, icon_label)

Format_text    is text specifying the type of data you want to paste from the Clipboard.

 

Pastelink_logical    is a logical value specifying whether to link the pasted data to its source application.

Display_icon_logical    is a logical value that specifies whether you want an application's icon to be displayed on the worksheet instead of the linked data. Equivalent to the Display as Icon check box on the Paste Special dialog box. If TRUE, the application's icon will be displayed. If FALSE or omitted, the application's icon will not be displayed.

Icon_file    is the name of the file (with an .EXE or .DLL extension) that contains the icon. If display_icon_logical is FALSE, this argument is ignored.

Icon_number    is the number associated with the icon and corresponds to the icon's relative position within the Icon Drop Down list box on the Change Icon Dialog box, which appears when you click the Change Icon button in the Paste Special dialog box. If display_icon_logical is FALSE, this argument is ignored.

Icon_label    is the caption that you want to appear below the icon, and is equivalent to the Caption text box on the Change Icon dialog box, which appears when you click the Change Icon button in the Paste Special dialog box. If display_icon_logical is FALSE, this argument is ignored.

Related Functions

Syntax 1   Pasting into a sheet or macro sheet

Syntax 2   Copying from a sheet and pasting into a chart

Syntax 3   Copying and pasting between charts

Return to index