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 OptionsDetails and Options

ExamplesExamplesopen allclose all

Basic Examples  (3)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]=
Introduced in 2014
(10.0)