SelectedCells

SelectedCells[notebook]

returns a list of CellObject expressions corresponding to the currently selected cells in notebook.

SelectedCells[]

returns the currently selected cells in the notebook in which this function is being evaluated.

Details and Options

Examples

open allclose all

Basic Examples  (3)

Return a given selected cell:

In[1]:=
Click for copyable input
Out[1]=

Return an empty list if no cell is selected:

In[1]:=
Click for copyable input
Out[1]=

Return selected cells of a given notebook:

In[1]:=
Click for copyable input
Out[1]=

Options  (1)

See Also

Cells  EvaluationCell  NotebookSelection  SelectionMove

Introduced in 2014
(10.0)